Merge pull request #740 from rajasec/process-argscheck

Fixing index out of range during exec of container
This commit is contained in:
Qiang Huang 2016-04-22 11:09:27 +08:00
commit 9a69882ab9
1 changed files with 4 additions and 0 deletions

View File

@ -99,6 +99,10 @@ func execProcess(context *cli.Context) (int, error) {
if err != nil {
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")
state, err := container.State()
if err != nil {