diff --git a/validate.go b/validate.go index b2830e66f..719e8c14c 100644 --- a/validate.go +++ b/validate.go @@ -45,9 +45,9 @@ var ( ) var bundleValidateCommand = cli.Command{ - Name: "validate", - Usage: "validate a OCI bundle", - Flags: bundleValidateFlags, + Name: "validate", + Usage: "validate a OCI bundle", + Flags: bundleValidateFlags, Before: before, Action: func(context *cli.Context) error { inputPath := context.String("path") @@ -170,6 +170,10 @@ func checkProcess(process rspec.Process, rootfs string) { } } + if len(process.Args) < 1 { + logrus.Fatalf("args should not be empty") + } + for index := 0; index < len(process.Capabilities); index++ { capability := process.Capabilities[index] if !capValid(capability) {