Skip to content

fix: quote \$0 in basename call#2098

Closed
operagxoksana wants to merge 1 commit intoNVIDIA-NeMo:mainfrom
operagxoksana:patch-1
Closed

fix: quote \$0 in basename call#2098
operagxoksana wants to merge 1 commit intoNVIDIA-NeMo:mainfrom
operagxoksana:patch-1

Conversation

@operagxoksana
Copy link
Copy Markdown

@operagxoksana operagxoksana commented Mar 11, 2026

Quote $0 in the basename call to avoid potential word splitting if the script path contains spaces. This change does not alter behavior but makes the script more robust.

Summary by CodeRabbit

  • Tests
    • Enhanced test script reliability with improved handling of file paths containing spaces to ensure consistent behavior across different environments.

Signed-off-by: operagxoksana <operagxoksana@gmail.com>
@operagxoksana operagxoksana requested a review from a team as a code owner March 11, 2026 13:39
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Mar 11, 2026

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.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cded46a4-bc01-4464-bdf1-b1bbfe82d4de

📥 Commits

Reviewing files that changed from the base of the PR and between 280d3aa and 2bf9618.

📒 Files selected for processing (1)
  • tests/functional/grpo_megatron_lora_async.sh

📝 Walkthrough

Walkthrough

A single line in a bash test script was modified to add quotes around a variable reference in a basename command. The change prevents potential word-splitting if the script path contains spaces, improving robustness of the EXP_NAME assignment.

Changes

Cohort / File(s) Summary
Bash Script Enhancement
tests/functional/grpo_megatron_lora_async.sh
Added quotes around $0 in basename command to prevent word-splitting when script path contains spaces.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: quote $0 in basename call' directly and specifically describes the main change: adding quotes around $0 in a basename call for robustness.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Test Results For Major Changes ✅ Passed PR adds proper quoting around $0 variable in shell script, a best practice that doesn't alter behavior or affect performance.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@terrykong
Copy link
Copy Markdown
Collaborator

Hi @operagxoksana . Thanks for contributing. Currently we don't have any example where the quoting is needed, so I'll close this for now. Feel free to open if you find a bug

@terrykong terrykong closed this Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants