fix: correct positional arg shift after use-git-cli deprecation - #115
Closed
laurigates wants to merge 1 commit into
Closed
fix: correct positional arg shift after use-git-cli deprecation#115laurigates wants to merge 1 commit into
laurigates wants to merge 1 commit into
Conversation
Removing the use-git-cli entry from action.yml's args (8b229e2) left entrypoint.sh consuming five leading positionals and running `shift 5`. As a result --log-level is consumed into the removed use-git-cli slot, `shift 5` discards it, and the log-level value falls into cargo-deny's subcommand position — every run fails with `error: unrecognized subcommand '<log-level>'`. Drop the (now deprecated, no-effect) use-git-cli handling and shift one fewer positional. The post-shift arguments are byte-identical to the working v2.0.20 layout, and the downstream `dirname "$4"` manifest-dir reference still resolves correctly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 tasks
Member
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.
Fix positional-argument shift introduced by deprecating
use-git-clientrypoint.shconsumes a fixed number of leading positional arguments and then runscargo-deny "$@"on the remainder:Commit
8b229e2("Deprecate use-git-cli") removed theuse-git-clientry fromaction.yml'sargs:but leftentrypoint.shreading five leading positionals. As a result--log-levelis consumed into the (now nonexistent)use-git-clislot,shift 5discards it, and the log-level value falls intocargo-deny's subcommand position — so every run fails with:This regressed
@v2at the v2.1.0 release.Change
Drop the
use-git-clipositional handling (consistent with its deprecation to no-effect) and shift one fewer:Verification
Simulating the entrypoint's
shift Nthencargo-deny $*against the exact arg vector GitHub passes:use-git-clipresent) +shift 5cargo-deny --log-level warn --manifest-path ./Cargo.toml check licenses bans sourcesuse-git-cliremoved) +shift 5cargo-deny warn --manifest-path ./Cargo.toml check licenses bans sourcesunrecognized subcommand 'warn'shift 4(this PR)cargo-deny --log-level warn --manifest-path ./Cargo.toml check licenses bans sourcesThe
shift 4result is byte-identical to the working v2.0.20 layout, and the downstreamdirname "$4"(manifest directory) reference still resolves to the manifest path as before.Fixes #114