We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2adaff commit 9b9b3d8Copy full SHA for 9b9b3d8
zip/zip_test.go
@@ -1037,12 +1037,11 @@ func TestVCS(t *testing.T) {
1037
var downloadErrorCount int32
1038
const downloadErrorLimit = 3
1039
1040
- haveVCS := make(map[string]bool)
1041
- if _, err := gitPath(); err == nil {
1042
- haveVCS["git"] = true
1043
- }
1044
- if _, err := exec.LookPath("hg"); err == nil {
1045
- haveVCS["hg"] = true
+ _, gitErr := gitPath()
+ _, hgErr := exec.LookPath("hg")
+ haveVCS := map[string]bool{
+ "git": gitErr == nil,
+ "hg": hgErr == nil,
1046
}
1047
1048
for _, test := range []struct {
0 commit comments