Refactor exportFiles function

This commit is contained in:
Joe Lim committed 2023-06-18 16:36:47 +10:00
1 parent 03f1c3b44c
commit 475d11480b
3 files changed
+15 -40

No files matched your search

-15
View File
@@ -218,21 +218,6 @@ func errCrossDevice(err error) bool {
return err.(*os.LinkError).Err.(unix.Errno) == unix.EXDEV
}
func exportFiles(f string, fs []string, pwd string) {
envFile := f
envFiles := strings.Join(fs, gOpts.filesep)
os.Setenv("f", envFile)
os.Setenv("fs", envFiles)
os.Setenv("PWD", pwd)
if len(fs) == 0 {
os.Setenv("fx", envFile)
} else {
os.Setenv("fx", envFiles)
}
}
func quoteString(s string) string {
return s
}