You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parse ci/install_cccl.sh options before resolving the install target.
Require exactly one positional install directory after options are consumed.
Accept and document -verbose alongside -v and --verbose.
Root Cause
target_dir=$(realpath "$1") ran before option parsing, so option-first usage such as ci/install_cccl.sh --verbose /tmp/cccl-install passed --verbose to realpath instead of treating it as a script option.
Validation
bash -n ci/install_cccl.sh
git diff --check
Fake cmake shim probes for --verbose, -v, -verbose, missing directory, and extra directory arguments.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 810ec480-5655-4507-9194-b4893d809ebf
📥 Commits
Reviewing files that changed from the base of the PR and between aa4a271 and 0e645f1.
📒 Files selected for processing (1)
ci/install_cccl.sh
Note: CodeRabbit is enabled on this repository as a convenience for maintainers
and contributors. Use your best judgment when considering its review comments and
suggestions — a suggested change may be inadequate, unnecessary, or safe to ignore.
Contributors are not expected to address every comment. Human reviews are what
ultimately matter for merging.
Summary
This PR fixes the option parsing logic in ci/install_cccl.sh to correctly handle the --verbose, -v, and -verbose flags when passed before the install directory argument.
Changes
File: ci/install_cccl.sh
Reorganized the script to parse CLI options before attempting to resolve the target directory from positional arguments
Updated the usage documentation to include -verbose alongside -v and --verbose as valid verbose options
Modified the option-parsing case statement to handle -verbose and to exit the parsing loop when unknown options are encountered
Added validation to ensure exactly one positional install directory is provided after option parsing, which is then resolved via realpath and created if necessary
Root Cause
Previously, target_dir=$(realpath "$1") executed before option parsing, causing commands like ci/install_cccl.sh --verbose /tmp/cccl-install to pass --verbose to realpath instead of treating it as a script option.
Testing
Syntax validation via bash -n
Whitespace checks via git diff --check
Functional testing using a fake cmake shim to verify handling of --verbose, -v, -verbose options, missing directory, and extra directory arguments
Walkthrough
ci/install_cccl.sh defers computation of target_dir until after CLI options and argument count validation. Option parsing now recognizes -verbose alongside -v/--verbose, stops on unknown options, and usage text reflects all three verbose option forms.
Changes
Argument Validation Refactor
Layer / File(s)
Summary
Refactored option parsing and argument validation ci/install_cccl.sh
Usage text updated to document -v/--verbose/-verbose. Option parsing loop expanded to recognize -verbose and stop on unknown options. Argument count validation moved to after option parsing; target_dir computation via realpath and directory creation deferred to occur only after that validation check.
Comment @coderabbitai help to get the list of available commands and usage tips.
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
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
ci/install_cccl.shoptions before resolving the install target.-verbosealongside-vand--verbose.Root Cause
target_dir=$(realpath "$1")ran before option parsing, so option-first usage such asci/install_cccl.sh --verbose /tmp/cccl-installpassed--verbosetorealpathinstead of treating it as a script option.Validation
bash -n ci/install_cccl.shgit diff --checkcmakeshim probes for--verbose,-v,-verbose, missing directory, and extra directory arguments.