Skip to content

fix(cli): add --version to bash and PowerShell fallbacks (CIB-007) - #157

Merged
joshuaboys merged 1 commit into
mainfrom
work/cib-007
Sep 29, 2026
Merged

joshuaboys merged 1 commit into
mainfrom
work/cib-007

Conversation

@joshuaboys

Copy link
Copy Markdown
Contributor

Summary

Give the bash and PowerShell fallback CLIs the same top-level version surface as the Rust binary, so a user debugging a cli_version pin mismatch can ask the CLI what it is.

  • aps --version and -V print aps <semver> from APS_CLI_VERSION / Get-ApsCliVersion, matching clap (aps 0.9.0)
  • PowerShell parses $args so -V is not captured as -Verbose and pwsh -File --version is not swallowed as help
  • The bare version command stays rejected — Rust does not accept it
  • Three-way identity is pinned by test/cli-parity.sh against cli/Cargo.toml

Closes ISS-013.

APS Work Items

  • CIB-007: Give the fallback CLIs a version surface (Complete: 2026-09-29)

Test Plan

  • ./test/run.sh (includes Test 62 --version)
  • ./test/cli-parity.sh bash = Rust = PowerShell 7.4.6 on --version, -V, and pwsh -File --version
  • test/ps-parity.ps1 version surface cases
  • ./bin/aps lint plans
  • Native Windows PowerShell 5.1 smoke of aps.ps1 --version (not run in this change)

The Rust binary already answers `aps --version` with `aps 0.9.0`. The
fallback CLIs rejected the flag as an unknown command, so a user on
bash or PowerShell had no way to ask which toolchain they were running.

Print the same clap-shaped string from APS_CLI_VERSION. Parse PowerShell
argv from $args so `-V` is not captured as -Verbose and `pwsh -File
--version` is not swallowed.

APS: CIB-007
@joshuaboys
joshuaboys merged commit fb7df5a into main Sep 29, 2026
13 of 15 checks passed
@joshuaboys
joshuaboys deleted the work/cib-007 branch September 29, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant