Repository navigation
Conversation
This branch has not been deployed
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.
Description
preprocess_cli_argsruns before Clap. Its compact preprocessor used to rewrite every-cor--compacttoken, including a token that belongs to another option's value or appears after--. This changed the argv that Clap actually received and produced a misleading compact-option error.The preprocessor now uses the existing Clap-derived
cli_value_options()metadata to pass value-bearing options and their next argument through unchanged. It also stops at--. Commands without a compact token return immediately, so they do not build the option metadata. Actual bare-c/--compactand explicit-c false/--compact falseretain their existing behavior.Human Involvement
Related Issue
Fixes #5665. This change is limited to the compact argv preprocessor. Whether Clap accepts hyphen-prefixed values for particular options remains a separate parser concern; #5571 addresses
--content.Type of Change
Changes Made
-c/--compactwhen they are values of another option.--and retain compact boolean forms.--account,--content, the--separator, and--compact false.Testing
Rust 1.91.1 on macOS x86_64:
cargo test -p ov_cli --bin ov compact --locked— 20 passed.cargo test -p ov_cli --bin ov --locked -- --skip curated_help_lists_timeout_for_waiting_commands— 508 passed, 1 filtered.help_ui::tests::curated_help_lists_timeout_for_waiting_commandsexpects a timeout option inov add-skillhelp; the same test also fails on an unmodifiedmaincheckout.config_overrideintegration binary did not complete in this local environment: one test failed and another waited over 60 seconds for its configured service. It was stopped; CI should verify it in the intended environment.git diff --checkpassed. Repository-wide rustfmt check reports existing formatting differences outside this patch; the changed regions match rustfmt output.Checklist
Screenshots (if applicable)
Not applicable.
Additional Notes
No CLI option name or documented invocation changes. The regression verifies the argv handed to Clap; actual acceptance of leading-hyphen values depends on each Clap option's parser settings.