Skip to content

Commit

Permalink
fix: bad regex regression introduced by #242 (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
sworisbreathing committed Feb 27, 2020
1 parent efa34c9 commit 99a1a98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var (
validServiceFormat = regexp.MustCompile(`^[\w\-\.]+$`)
validServicePathFormat = regexp.MustCompile(`^[\w\-\.]+(\/[\w\-\.]+)*$`)
validServiceFormatWithLabel = regexp.MustCompile(`^[\w\-\.\:]+$`)
validServicePathFormatWithLabel = regexp.MustCompile(`^[\w\-\.]+(\/[\w\-\.]+)+(\:[\w\-\.]+)*$`)
validServicePathFormatWithLabel = regexp.MustCompile(`^[\w\-\.]+((\/[\w\-\.]+)+(\:[\w\-\.]+)*)?$`)

verbose bool
numRetries int
Expand Down
1 change: 1 addition & 0 deletions cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ func TestValidations(t *testing.T) {

// Test Service format with PATH and Label
validServicePathFormatWithLabel := []string{
"foo",
"foo/bar:-current-",
"foo.bar/foo:current",
"foo-bar/foo:current",
Expand Down

0 comments on commit 99a1a98

Please sign in to comment.