1
0

Correctly handle empty workdir

This commit is contained in:
2023-04-07 17:46:36 +00:00
부모 c3cf25e523
커밋 a4f2a31819

파일 보기

@ -200,7 +200,12 @@ func (c container) Run(workdir string, command string) (output string, err error
if c.Volumes.Boot != "" {
args = append(args, "-v", c.Volumes.Boot+":/boot")
}
args = append(args, c.name, "bash", "-c", "cd /work && "+command)
args = append(args, c.name, "bash", "-c")
if workdir != "" {
args = append(args, "cd /work && "+command)
} else {
args = append(args, command)
}
cmd := exec.Command("docker", args...)