export PWD on windows to fix broken build

cc #591
This commit is contained in:
Gokcehan committed 2021-04-04 18:30:00 +03:00
1 parent ca0068514a
commit 229b7b1ade
1 file changed
+2 -1
+2 -1
View File
@@ -134,7 +134,7 @@ func errCrossDevice(err error) bool {
return err.(*os.LinkError).Err.(syscall.Errno) == 17 return err.(*os.LinkError).Err.(syscall.Errno) == 17
} }
func exportFiles(f string, fs []string) { func exportFiles(f string, fs []string, pwd string) {
envFile := fmt.Sprintf(`"%s"`, f) envFile := fmt.Sprintf(`"%s"`, f)
var quotedFiles []string var quotedFiles []string
@@ -145,6 +145,7 @@ func exportFiles(f string, fs []string) {
os.Setenv("f", envFile) os.Setenv("f", envFile)
os.Setenv("fs", envFiles) os.Setenv("fs", envFiles)
os.Setenv("PWD", pwd)
if len(fs) == 0 { if len(fs) == 0 {
os.Setenv("fx", envFile) os.Setenv("fx", envFile)