Skip to content

Fix install script verbose option parsing#9409

Open
fallintoplace wants to merge 1 commit into
NVIDIA:mainfrom
fallintoplace:fix-install-cccl-verbose-options
Open

Fix install script verbose option parsing#9409
fallintoplace wants to merge 1 commit into
NVIDIA:mainfrom
fallintoplace:fix-install-cccl-verbose-options

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

Summary

  • 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.

@fallintoplace fallintoplace requested a review from a team as a code owner June 11, 2026 18:11
@fallintoplace fallintoplace requested a review from jrhemstad June 11, 2026 18:11
@github-project-automation github-project-automation Bot moved this to Todo in CCCL Jun 11, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL Jun 11, 2026
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

1 participant