Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtctl: use basename when printing help #2356

Closed
dhiller opened this issue Jun 7, 2019 · 1 comment · Fixed by #2465
Closed

virtctl: use basename when printing help #2356

dhiller opened this issue Jun 7, 2019 · 1 comment · Fixed by #2465
Assignees
Labels

Comments

@dhiller
Copy link
Contributor

dhiller commented Jun 7, 2019

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug

/kind enhancement

What happened:

When used as a krew plugin, kubectl virt [help] prints virtctl instead of kubectl virt

What you expected to happen:

This is how it should be:

$ kubectl virt
Available Commands:
...
  vnc          Open a vnc connection to a virtual machine instance.

Use "kubectl virt <command> --help" for more information about a given command.
Use "kubectl virt options" for a list of global command-line options (applies to all commands).

How to reproduce it (as minimally and precisely as possible):

$ kubectl virt
Available Commands:
...
  vnc          Open a vnc connection to a virtual machine instance.

Use "virtctl <command> --help" for more information about a given command.
Use "virtctl options" for a list of global command-line options (applies to all commands).

Anything else we need to know?:

from krew-index PR

Also a piece of feedback, when you run kubectl virt the help message shows virtctl instead of kubectl virt (you can look at os.args[0] to detect whether running as a plugin or not, the basename would be kubectl-virt[.exe]).

Environment:

  • KubeVirt version (use virtctl version): Client Version: version.Info{GitVersion:"v0.17.0", GitCommit:"c0f960702dce718419a767f3913669f539229ff0", GitTreeState:"clean", BuildDate:"2019-05-05T08:09:14Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
  • Kubernetes version (use kubectl version): Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.5", GitCommit:"51dd616cdd25d6ee22c83a858773b607328a18ec", GitTreeState:"archive", BuildDate:"2019-03-05T13:36:50Z", GoVersion:"go1.12", Compiler:"gc", Platform:"linux/amd64"}
  • VM or VMI specifications: -
  • Cloud provider or hardware configuration: -
  • OS (e.g. from /etc/os-release): any
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
@dhiller dhiller changed the title virtctl: regard base path when printing help virtctl: use basename when printing help Jun 7, 2019
@dhiller
Copy link
Contributor Author

dhiller commented Jun 11, 2019

/assign

dhiller added a commit to dhiller/kubevirt that referenced this issue Jul 8, 2019
Replace hard coded `virtctl` by using the basename of the call,
this enables nicer output when installed via krew plugin package
manager.

Fixes kubevirt#2356
dhiller added a commit to dhiller/kubevirt that referenced this issue Jul 8, 2019
Replace hard coded `virtctl` by using the basename of the call,
this enables nicer output when installed via krew plugin package
manager.

Fixes kubevirt#2356
dhiller added a commit to dhiller/kubevirt that referenced this issue Jul 9, 2019
Replace hard coded `virtctl` by using the basename of the call,
this enables nicer output when installed via krew plugin package
manager.

Fixes kubevirt#2356
dhiller added a commit to dhiller/kubevirt that referenced this issue Jul 10, 2019
Replace hard coded `virtctl` by using the basename of the call,
this enables nicer output when installed via krew plugin package
manager.

Fixes kubevirt#2356
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants