mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-13 11:17:30 +00:00
Merge pull request #3019 from somtochiama/get-cmd
Improve error message in get cmd
This commit is contained in:
commit
9f26b09a06
1 changed files with 3 additions and 1 deletions
|
|
@ -162,7 +162,9 @@ func (get getCommand) run(cmd *cobra.Command, args []string) error {
|
|||
}
|
||||
|
||||
if get.list.len() == 0 {
|
||||
if !getAll {
|
||||
if len(args) > 0 {
|
||||
logger.Failuref("%s object '%s' not found in '%s' namespace", get.kind, args[0], *kubeconfigArgs.Namespace)
|
||||
} else if !getAll {
|
||||
logger.Failuref("no %s objects found in %s namespace", get.kind, *kubeconfigArgs.Namespace)
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue