Skip to content

Commit 8e3ecf4

Browse files
author
Ma Shimiao
authored
Merge pull request #522 from q384566678/validate-rootpath
validate: fix nil deference
2 parents 801ab0c + cdf38ca commit 8e3ecf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

validate/validate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ func (v *Validator) CheckProcess() (errs error) {
334334
fmt.Errorf("args must not be empty"),
335335
rspec.Version))
336336
} else {
337-
if filepath.IsAbs(process.Args[0]) {
337+
if filepath.IsAbs(process.Args[0]) && v.spec.Root != nil {
338338
var rootfsPath string
339339
if filepath.IsAbs(v.spec.Root.Path) {
340340
rootfsPath = v.spec.Root.Path

0 commit comments

Comments
 (0)