Skip to content

Commit

Permalink
exact match if there are only 1 argument
Browse files Browse the repository at this point in the history
  • Loading branch information
cr7258 committed Feb 4, 2024
1 parent f8b6538 commit 06bc650
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/lookup_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ rbac-tool lookup -ne '^system:.*'
var err error

if regex == "" {
if len(args) > 0 {
if len(args) == 1 {
// exact match
re, err = regexp.Compile(fmt.Sprintf(`^%v$`, args[0]))
} else {
Expand Down

0 comments on commit 06bc650

Please sign in to comment.