환경변수를 expand할 수 있음
This commit is contained in:
@ -153,7 +153,14 @@ func prepareProcessLaunch(storageRoot string, req *shared.StartProcessRequest) *
|
||||
os.Chmod(path.Join(verpath, exefile), 0777)
|
||||
|
||||
exef, _ := os.Executable()
|
||||
cmd := exec.Command(path.Join(path.Dir(exef), verpath, exefile), req.Args[1:]...)
|
||||
|
||||
expanded := make([]string, len(req.Args))
|
||||
for i, arg := range req.Args {
|
||||
expanded[i] = os.ExpandEnv(arg)
|
||||
}
|
||||
exename := path.Join(path.Dir(exef), verpath, exefile)
|
||||
|
||||
cmd := exec.Command(os.ExpandEnv(exename), expanded[1:]...)
|
||||
|
||||
cmd.Dir = verpath
|
||||
stdin, _ := cmd.StdinPipe()
|
||||
|
||||
Reference in New Issue
Block a user