quote file variables on windows

This commit is contained in:
Gokcehan committed 2019-03-17 20:16:19 +03:00
1 parent 0eedb71d6c
commit 6f35abb4ca
3 files changed
+40 -14

No files matched your search

+15
View File
@@ -10,6 +10,7 @@ import (
"os/user"
"path/filepath"
"runtime"
"strings"
)
var (
@@ -133,3 +134,17 @@ func moveCursor(y, x int) {
func isExecutable(f os.FileInfo) bool {
return f.Mode()&0111 != 0
}
func exportFiles(f string, fs []string) {
envFile := f
envFiles := strings.Join(fs, gOpts.filesep)
os.Setenv("f", envFile)
os.Setenv("fs", envFiles)
if len(fs) == 0 {
os.Setenv("fx", envFile)
} else {
os.Setenv("fx", envFiles)
}
}