Fixing index out of range during exec of container
Signed-off-by: rajasec <rajasec79@gmail.com> Fixed review comments Signed-off-by: rajasec <rajasec79@gmail.com> updated the arguments check as per review comment Signed-off-by: rajasec <rajasec79@gmail.com>
This commit is contained in:
parent
d14b04a331
commit
c3cc4b36ba
4
exec.go
4
exec.go
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue