Repository navigation
fix(cli): add --version to bash and PowerShell fallbacks (CIB-007) - #157
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Give the bash and PowerShell fallback CLIs the same top-level version surface as the Rust binary, so a user debugging a
cli_versionpin mismatch can ask the CLI what it is.aps --versionand-Vprintaps <semver>fromAPS_CLI_VERSION/Get-ApsCliVersion, matching clap (aps 0.9.0)$argsso-Vis not captured as-Verboseandpwsh -File --versionis not swallowed as helpversioncommand stays rejected — Rust does not accept ittest/cli-parity.shagainstcli/Cargo.tomlCloses ISS-013.
APS Work Items
Test Plan
./test/run.sh(includes Test 62--version)./test/cli-parity.shbash = Rust = PowerShell 7.4.6 on--version,-V, andpwsh -File --versiontest/ps-parity.ps1version surface cases./bin/aps lint plansaps.ps1 --version(not run in this change)