Skip to content

Commit 8d7fcdd

Browse files
author
Stef Graces
committed
Update ignore validation for tag
1 parent 077220a commit 8d7fcdd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: pkg/name/tag.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,11 @@ func NewTag(name string, opts ...Option) (Tag, error) {
8686
// even when not being strict.
8787
// If we are being strict, we want to validate the tag regardless in case
8888
// it's empty.
89-
if !opt.ignoreValidation || tag != "" || opt.strict {
90-
if err := checkTag(tag); err != nil {
91-
return Tag{}, err
89+
if !opt.ignoreValidation {
90+
if tag != "" || opt.strict {
91+
if err := checkTag(tag); err != nil {
92+
return Tag{}, err
93+
}
9294
}
9395
}
9496

0 commit comments

Comments
 (0)