From 229b7b1adee79282931011a83ee781bf1e018ccc Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Sun, 4 Apr 2021 18:30:00 +0300 Subject: [PATCH] export PWD on windows to fix broken build cc #591 --- os_windows.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/os_windows.go b/os_windows.go index bc8ff5fb..8f9cfd6c 100644 --- a/os_windows.go +++ b/os_windows.go @@ -134,7 +134,7 @@ func errCrossDevice(err error) bool { 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) var quotedFiles []string @@ -145,6 +145,7 @@ func exportFiles(f string, fs []string) { os.Setenv("f", envFile) os.Setenv("fs", envFiles) + os.Setenv("PWD", pwd) if len(fs) == 0 { os.Setenv("fx", envFile)