Severity
minor
Summary
On the shipped binary auth status is not registered, so Cobra treats status as a positional arg, prints the auth help, and exits 0. Scripts that test withings-export auth status; echo $? to see whether the CLI is logged in see a green light unconditionally.
Reproduce
$ withings-export auth status; echo "EXIT=$?"
Authentication commands
Usage:
withings-export auth [command]
Available Commands:
login ...
logout ...
refresh ...
EXIT=0
Expected
With auth status registered (it is on main, see PR #9 / #14), this prints a one-line readiness status and exits 0/1 appropriately. While that's missing, an unknown subcommand should at least print Error: unknown command "status" for "withings-export auth" and exit non-zero — Cobra's default — but currently does not. Worth checking whether authCmd has SilenceUsage/Args set somewhere causing the swallow.
Severity
minor
Summary
On the shipped binary
auth statusis not registered, so Cobra treatsstatusas a positional arg, prints theauthhelp, and exits 0. Scripts that testwithings-export auth status; echo $?to see whether the CLI is logged in see a green light unconditionally.Reproduce
Expected
With
auth statusregistered (it is onmain, see PR #9 / #14), this prints a one-line readiness status and exits 0/1 appropriately. While that's missing, an unknown subcommand should at least printError: unknown command "status" for "withings-export auth"and exit non-zero — Cobra's default — but currently does not. Worth checking whetherauthCmdhasSilenceUsage/Argsset somewhere causing the swallow.