Skip to content

Commit

Permalink
hotfix cmd/tag to allow _ and - for launchctl-autostart
Browse files Browse the repository at this point in the history
  • Loading branch information
maxzinkus committed Apr 27, 2023
1 parent b3c1096 commit 4700cd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ var tagCmd = &cobra.Command{
}

func validateTags(tags []string) {
format := regexp.MustCompile("^[a-zA-Z0-9_]*$")
format := regexp.MustCompile("^[a-zA-Z0-9_\\-]*$")
for _, tag := range tags {
if !format.MatchString(tag) {
log.Fatalf("[%s] contains non-alphanumeric characters", tag)
log.Fatalf("[%s] contains invalid characters (alphanumeric, _, and -)", tag)
}
}
}
Expand Down

0 comments on commit 4700cd8

Please sign in to comment.