-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Labels
bugSomething isn't workingSomething isn't workingcliIssues associated with the CLIIssues associated with the CLIv2issue for v2 Skupper versionissue for v2 Skupper version
Description
Describe the bug
On failure, the completion subcommand prints the error and usage to stdout, instead of stderr.
It also does not return a non-zero exit code.
How To Reproduce
Just issue an invalid completion command, such as missing the shell specification
$ skupper completion 2> /dev/null
Generate the autocompletion script for skupper for the specified shell.
See each sub-command's help for details on how to use the generated script.
Usage:
skupper completion [command]
Available Commands:
bash Generate the autocompletion script for bash
fish Generate the autocompletion script for fish
powershell Generate the autocompletion script for powershell
zsh Generate the autocompletion script for zsh
Flags:
-h, --help help for completion
Global Flags:
-c, --context string Set the kubeconfig context
--kubeconfig string Path to the kubeconfig file to use
-n, --namespace string Set the namespace
-p, --platform string Set the platform type to use [kubernetes, podman, docker, linux]
Use "skupper completion [command] --help" for more information about a command.
$ echo $?
0
Expected behavior
The error message should go to stderr. This is specially important for this subcommand, as its output is consumed by the shell.
The exit code should be non-zero, too, in case of failures.
Environment details
- Skupper CLI: 2.0
- Skupper Operator (if applicable): N/A
- Platform: N/A
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcliIssues associated with the CLIIssues associated with the CLIv2issue for v2 Skupper versionissue for v2 Skupper version