mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Merge pull request #2160 from thephoenixofthevoid/thephoenixofthevoid-fix-losing-env
This commit is contained in:
commit
facaa36d22
|
@ -195,7 +195,9 @@ func runFuse(cmd *Command, args []string) bool {
|
||||||
arg0 := os.Args[0]
|
arg0 := os.Args[0]
|
||||||
argv := append(os.Args, "-o", "child")
|
argv := append(os.Args, "-o", "child")
|
||||||
|
|
||||||
attr := os.ProcAttr{}
|
attr := os.ProcAttr{}
|
||||||
|
attr.Env = os.Environ()
|
||||||
|
|
||||||
child, err := os.StartProcess(arg0, argv, &attr)
|
child, err := os.StartProcess(arg0, argv, &attr)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -211,11 +213,6 @@ func runFuse(cmd *Command, args []string) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// I don't know why PATH environment variable is lost
|
|
||||||
if err := os.Setenv("PATH", "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"); err != nil {
|
|
||||||
panic(fmt.Errorf("setenv: %s", err))
|
|
||||||
}
|
|
||||||
|
|
||||||
// just call "weed mount" command
|
// just call "weed mount" command
|
||||||
return runMount(cmdMount, []string{})
|
return runMount(cmdMount, []string{})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue