Merge pull request #740 from rajasec/process-argscheck
Fixing index out of range during exec of container
This commit is contained in:
commit
9a69882ab9
4
exec.go
4
exec.go
|
@ -99,6 +99,10 @@ func execProcess(context *cli.Context) (int, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return -1, err
|
return -1, err
|
||||||
}
|
}
|
||||||
|
path := context.String("process")
|
||||||
|
if path == "" && len(context.Args()) == 1 {
|
||||||
|
return -1, fmt.Errorf("process args cannot be empty")
|
||||||
|
}
|
||||||
detach := context.Bool("detach")
|
detach := context.Bool("detach")
|
||||||
state, err := container.State()
|
state, err := container.State()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue