Skip to content

Commit f49d861

Browse files
author
Ma Shimiao
authored
Merge pull request #378 from q384566678/zz-test
validate: modify the validation scope of mount.destination
2 parents 3a9076b + 425cd22 commit f49d861

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

validate/validate.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,15 +376,15 @@ func (v *Validator) CheckMounts() (msgs []string) {
376376
return
377377
}
378378

379-
if supportedTypes != nil {
380-
for _, mount := range v.spec.Mounts {
379+
for _, mount := range v.spec.Mounts {
380+
if supportedTypes != nil {
381381
if !supportedTypes[mount.Type] {
382382
msgs = append(msgs, fmt.Sprintf("Unsupported mount type %q", mount.Type))
383383
}
384+
}
384385

385-
if !filepath.IsAbs(mount.Destination) {
386-
msgs = append(msgs, fmt.Sprintf("destination %v is not an absolute path", mount.Destination))
387-
}
386+
if !filepath.IsAbs(mount.Destination) {
387+
msgs = append(msgs, fmt.Sprintf("destination %v is not an absolute path", mount.Destination))
388388
}
389389
}
390390

0 commit comments

Comments
 (0)