Skip to content

Commit 7150e8d

Browse files
author
Ma Shimiao
authored
Merge pull request #393 from q384566678/rootfs-check
validate: increase readonly validation
2 parents 2c7faf8 + ab1a21e commit 7150e8d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

validate/validate.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,13 @@ func (v *Validator) CheckRootfsPath() (msgs []string) {
131131
msgs = append(msgs, fmt.Sprintf("root.path is %q, but it MUST be a child of %q", v.spec.Root.Path, absBundlePath))
132132
}
133133

134-
return
134+
if v.spec.Platform.OS == "windows" {
135+
if v.spec.Root.Readonly {
136+
msgs = append(msgs, "root.readonly field MUST be omitted or false when platform.os is windows")
137+
}
138+
}
135139

140+
return
136141
}
137142

138143
// CheckSemVer checks v.spec.Version

0 commit comments

Comments
 (0)