File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -57,11 +57,13 @@ func installTip(root, target string) error {
57
57
cmd .Stdout = os .Stdout
58
58
cmd .Stderr = os .Stderr
59
59
cmd .Dir = root
60
+ cmd .Env = dedupEnv (caseInsensitiveEnv , append (os .Environ (), "PWD=" + cmd .Dir ))
60
61
return cmd .Run ()
61
62
}
62
63
gitOutput := func (args ... string ) ([]byte , error ) {
63
64
cmd := exec .Command ("git" , args ... )
64
65
cmd .Dir = root
66
+ cmd .Env = dedupEnv (caseInsensitiveEnv , append (os .Environ (), "PWD=" + cmd .Dir ))
65
67
return cmd .Output ()
66
68
}
67
69
@@ -154,7 +156,11 @@ func installTip(root, target string) error {
154
156
return fmt .Errorf ("failed to detect an existing go installation for bootstrap: %v" , err )
155
157
}
156
158
cmd .Env = append (os .Environ (), "GOROOT_BOOTSTRAP=" + strings .TrimSpace (string (goroot )))
159
+ } else {
160
+ cmd .Env = os .Environ ()
157
161
}
162
+ cmd .Env = dedupEnv (caseInsensitiveEnv , append (cmd .Env , "PWD=" + cmd .Dir ))
163
+
158
164
if err := cmd .Run (); err != nil {
159
165
return fmt .Errorf ("failed to build go: %v" , err )
160
166
}
You can’t perform that action at this time.
0 commit comments