bin/altis-cli.js runs the config-load and setup gate inside main() before it parses any arguments (parser.parse(...) is the last thing it does). As a result --help and --version never reach yargs when the CLI is unconfigured:
- In a non-TTY (CI, scripts, piped output) an unconfigured CLI hits the
!config.get('didSetup') branch and calls process.exit(1) — so altis-cli --help fails for anyone who hasn't run setup.
- In a TTY it prompts "Run initial setup?" instead of showing help.
Spotted when trying to set up a simple asmoke test which failed in CI.
Fix: short-circuit --help / --version (and ideally -h / -v) before the config-load and setup gate, so informational flags work regardless of setup state — standard CLI behaviour. The parser is already built at that point (configure() on line 26), so it can handle these before any config work happens.
Once fixed, the smoke test could optionally go back through bin/altis-cli.js if we want it to cover the entry point too, though the parser-build test is arguably the better release check.
Acceptance Criteria
For Altis Team Use
Ready for Work Checklist
Is this ticket ready to be worked on? See
the Play Book Definition of Ready
Completion Checklist
Is this ticket done? See
the Play Book Definition of Done
bin/altis-cli.jsruns theconfig-loadand setup gate insidemain()before it parses any arguments (parser.parse(...)is the last thing it does). As a result--helpand--versionnever reachyargswhen the CLI is unconfigured:!config.get('didSetup')branch and callsprocess.exit(1)— so altis-cli --help fails for anyone who hasn't run setup.Spotted when trying to set up a simple asmoke test which failed in CI.
Fix: short-circuit --help / --version (and ideally -h / -v) before the config-load and setup gate, so informational flags work regardless of setup state — standard CLI behaviour. The parser is already built at that point (configure() on line 26), so it can handle these before any config work happens.
Once fixed, the smoke test could optionally go back through bin/altis-cli.js if we want it to cover the entry point too, though the parser-build test is arguably the better release check.
Acceptance Criteria
altis-cli --helpandaltis-cli --versionwork without returning error code 1For Altis Team Use
Ready for Work Checklist
Is this ticket ready to be worked on? See
the Play Book Definition of Ready
Completion Checklist
Is this ticket done? See
the Play Book Definition of Done
backportlabels been added to the PR?