Skip to content

Commit

Permalink
Merge pull request #600 from kinvolk/alban/cli-order
Browse files Browse the repository at this point in the history
validation: run CLI with correct argument order
  • Loading branch information
Zhou Hao committed Mar 12, 2018
2 parents 3a83c2c + 79ae4aa commit cb96426
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions validation/util/container.go
Expand Up @@ -69,15 +69,15 @@ func (r *Runtime) SetID(id string) {
func (r *Runtime) Create() (err error) {
var args []string
args = append(args, "create")
if r.ID != "" {
args = append(args, r.ID)
}
if r.PidFile != "" {
args = append(args, "--pid-file", r.PidFile)
}
if r.BundleDir != "" {
args = append(args, "--bundle", r.BundleDir)
}
if r.ID != "" {
args = append(args, r.ID)
}
cmd := exec.Command(r.RuntimeCommand, args...)
id := uuid.NewV4().String()
r.stdout, err = os.OpenFile(filepath.Join(r.bundleDir(), fmt.Sprintf("stdout-%s", id)), os.O_CREATE|os.O_EXCL|os.O_RDWR, 0600)
Expand Down

0 comments on commit cb96426

Please sign in to comment.