You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cue version
cue version v0.0.0-20240304165426-7d4d90de3798
go version go1.22.0
-buildmode exe
-compiler gc
DefaultGODEBUG httplaxcontentlength=1,httpmuxgo121=1,tls10server=1,tlsrsakex=1,tlsunsafeekm=1
CGO_ENABLED 1
GOARCH arm64
GOOS linux
vcs git
vcs.revision 7d4d90de3798a00807f50373466322771bd0a10a
vcs.time 2024-03-04T16:54:26Z
vcs.modified false
Does this issue reproduce with the latest release?
Yes
What did you do?
! exec cue help mod rubbish
stderr 'unknown command "mod rubbish"'
What did you expect to see?
Passing test (for some variation of the stderr expectation)
What did you see instead?
$ ts repro.txtar
> ! exec cue help mod rubbish
[stdout]
Usage:
cue mod <cmd> [arguments] [flags]
cue mod [command]
Available Commands:
get add and upgrade module dependencies
init initialize new module in current directory
publish publish the current module to a registry
tidy download and tidy module dependencies
Global Flags:
-E, --all-errors print all available errors
-i, --ignore proceed in the presence of errors
-s, --simplify simplify output
--strict report errors for lossy mappings
--trace trace computation
-v, --verbose print information about progress
Use "cue mod [command] --help" for more information about a command.
FAIL: /tmp/testscript1456235653/repro.txtar/script.txtar:1: unexpected command success
i.e. cue help mod rubbish exists with a 0 exit code for an unknown command mod rubbish
The text was updated successfully, but these errors were encountered:
We cover all edge cases now; a missing help command, sub-command,
and "cmd" command, as well as all the valid help combinations.
Note that for unknown "cmd" commands we print a more precise error,
and we also check that custom commands are added to the help text
in all cases where we print help text for cmd.
We join help_hello.txtar with help_cmd.txtar given their overlap.
Thanks to Naoki Kuroda for proposing a version of the fix in #2759
which was adapted here, along with more testscript coverage.
Fixes#2560.
Fixes#2918.
Closes#2759 as partially merged.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I252e57c59eab499e40daea45355f1da75acba249
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest release?
Yes
What did you do?
What did you expect to see?
Passing test (for some variation of the
stderr
expectation)What did you see instead?
i.e.
cue help mod rubbish
exists with a 0 exit code for an unknown commandmod rubbish
The text was updated successfully, but these errors were encountered: