mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-23 16:11:48 +00:00
handle len(args) < 1 case
Signed-off-by: Sjors Holtrop <sjors.holtrop@ritense.com>
This commit is contained in:
parent
2e9e8e2690
commit
f29bcfb108
1 changed files with 5 additions and 1 deletions
|
|
@ -175,7 +175,11 @@ func (resume resumeCommand) patch(ctx context.Context, args []string, listOpts [
|
||||||
}
|
}
|
||||||
|
|
||||||
if resume.list.len() == 0 {
|
if resume.list.len() == 0 {
|
||||||
logger.Failuref("%s object '%s' not found in %s namespace", resume.kind, args[0], resume.namespace)
|
if len(args) < 1 {
|
||||||
|
logger.Failuref("no %s objects found in %s namespace", resume.kind, resume.namespace)
|
||||||
|
} else {
|
||||||
|
logger.Failuref("%s object '%s' not found in %s namespace", resume.kind, args[0], resume.namespace)
|
||||||
|
}
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue