Skip to content

Commit

Permalink
chore(namespace): add cli help message (#1185)
Browse files Browse the repository at this point in the history
  • Loading branch information
rspurgeon authored Jan 25, 2024
1 parent 3582575 commit 97aaf4c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/file_namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ func executeNamespace(cmd *cobra.Command, _ []string) error {

err = namespace.Apply(yamlNode, selectors, cmdNamespacePathPrefix, cmdNamespaceAllowEmptySelectors)
if err != nil {
if strings.Contains(err.Error(), "no routes matched the selectors") {
// append CLI specific message
err = fmt.Errorf("%w (use --allow-empty-selectors to suppress this error)", err)
}
return fmt.Errorf("failed to apply the namespace: %w", err)
}

Expand Down

0 comments on commit 97aaf4c

Please sign in to comment.