Skip to content

Conversation

viktorking7
Copy link

Description

  • Change: Use rm -f for cleaning *.dbg.json in scripts/prepack.sh.
  • Why: Under set -e, rm without -f fails when no files match, causing brittle builds.

@viktorking7 viktorking7 requested a review from a team as a code owner October 14, 2025 16:18
Copy link

changeset-bot bot commented Oct 14, 2025

⚠️ No Changeset found

Latest commit: 23ce901

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

coderabbitai bot commented Oct 14, 2025

Walkthrough

Updated scripts/prepack.sh to modify the file deletion command for debug artifacts. The command was changed from:

  • rm contracts/build/contracts/*.dbg.json
    to:
  • rm -f contracts/build/contracts/*.dbg.json
    This adds the -f flag to suppress errors if matching files do not exist, while keeping the same glob pattern and target path. No other script logic or targets were changed.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly and concisely summarizes the primary change by indicating that the prepack script will no longer fail when .dbg.json files are absent, which directly reflects the update to use rm -f.
Description Check ✅ Passed The description specifically describes the switch to rm -f for cleaning .dbg.json files and explains the rationale under set -e, directly matching the changes in scripts/prepack.sh.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
scripts/prepack.sh (1)

20-20: Good fix: resilient cleanup under set -e.

Adding -f prevents brittle failures when the glob matches nothing. Optional hardening: add -- to guard against edge-case filenames.

Example:

-rm -f contracts/build/contracts/*.dbg.json
+rm -f -- contracts/build/contracts/*.dbg.json
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1cf1377 and 23ce901.

📒 Files selected for processing (1)
  • scripts/prepack.sh (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: Redirect rules - solidity-contracts
  • GitHub Check: Header rules - solidity-contracts
  • GitHub Check: slither
  • GitHub Check: coverage
  • GitHub Check: tests-foundry
  • GitHub Check: tests-upgradeable
  • GitHub Check: halmos
  • GitHub Check: tests
  • GitHub Check: Pages changed - solidity-contracts

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant