We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44e0616 commit 661a0dfCopy full SHA for 661a0df
1 file changed
internal/guest/runtime/hcsv2/uvm.go
@@ -66,15 +66,11 @@ var validContainerIDRegex = regexp.MustCompile("^" + validContainerIDRegexRaw +
66
67
// idType just changes the error message
68
func checkValidContainerID(id string, idType string) error {
69
- if id == UVMContainerID {
+ if id == UVMContainerID || validContainerIDRegex.MatchString(id){
70
return nil
71
}
72
73
- if !validContainerIDRegex.MatchString(id) {
74
- return errors.Errorf("invalid %s id: %s (must match %s)", idType, id, validContainerIDRegex.String())
75
- }
76
-
77
- return nil
+ return errors.Errorf("invalid %s id: %s (must match %s)", idType, id, validContainerIDRegex.String())
78
79
80
// VirtualPod represents a virtual pod that shares a UVM/Sandbox with other pods
0 commit comments