diff --git a/client/operation.go b/client/operation.go index 94dd5dc..2580f68 100644 --- a/client/operation.go +++ b/client/operation.go @@ -14,6 +14,7 @@ import ( "path/filepath" "regexp" "runtime/debug" + "strings" "syscall" "time" @@ -175,6 +176,7 @@ func prepareProcessLaunch(req *shared.StartProcessRequest) *procmeta { fi, err := os.Stat(verpath) if err == nil && fi.IsDir() { + args[0] = "./" + path.Clean(strings.TrimPrefix(args[0], "/")) cmd := exec.Command(args[0], args[1:]...) cmd.Dir = verpath stdin, _ := cmd.StdinPipe() @@ -341,6 +343,13 @@ func (hc *houstonClient) startChildProcess(req *shared.StartProcessRequest) erro } // launch가 성공하면 args 저장. this and parent folder + vers := hc.deploys[req.Name] + for _, ver := range vers { + if ver.Version == req.Version { + ver.Args = meta.cmd.Args + } + } + if argfile, err := os.Create(path.Join(req.Name, "@args")); err == nil { enc := json.NewEncoder(argfile) enc.Encode(meta.cmd.Args)