nerdctl icon indicating copy to clipboard operation
nerdctl copied to clipboard

Incorrect usage is displayed when running nerdctl without any command

Open narharim opened this issue 1 year ago • 4 comments

Description

Without any command passed to client, it's display [flags] instead of [command] in usage

Steps to reproduce the issue

  1. Run go build . inside cmd/nerdctl
  2. Run ./nerdctl

Describe the results you received and expected

Received Usage: nerdctl [flags]

Expected Usage: nerdctl [command]

What version of nerdctl are you using?

v2.0.0-rc.0

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

narharim avatar Jul 05 '24 16:07 narharim

https://github.com/containerd/nerdctl/blob/bc24aa95d8b2b0b2342b88fbf97d1a44a961aac2/cmd/nerdctl/main.go#L55 I think this line should be replaced with if c != c.Root()

narharim avatar Jul 05 '24 16:07 narharim

@AkihiroSuda I would like to raise a PR for this.

narharim avatar Jul 06 '24 09:07 narharim

@AkihiroSuda I would like to raise a PR for this.

please go ahead!

fahedouch avatar Jul 20 '24 21:07 fahedouch

@narharim curious if you are still interested in working on this?

apostasie avatar May 17 '25 01:05 apostasie