Skip to content

Fix invalid fallback in bench-run.sh#7173

Open
fallintoplace wants to merge 1 commit into
yarnpkg:masterfrom
fallintoplace:fix/bench-run-invalid-package-manager
Open

Fix invalid fallback in bench-run.sh#7173
fallintoplace wants to merge 1 commit into
yarnpkg:masterfrom
fallintoplace:fix/bench-run-invalid-package-manager

Conversation

@fallintoplace
Copy link
Copy Markdown

Summary

Fix the fallback branch in scripts/bench-run.sh so unknown package managers report a normal error instead of crashing with a bad shell substitution.

Root cause

The default case branch used ${$1}, which triggers bad substitution in bash before the intended message can be printed. It also used return 1 even though this branch runs at script top level.

Fix

  • use ${PACKAGE_MANAGER} in the error message
  • use exit 1 for the script-level failure path

Verification

  • bash -n scripts/bench-run.sh
  • bash scripts/bench-run.sh bogus gatsby /tmp/berry-bench-check now prints Invalid package manager bogus and exits non-zero

@fallintoplace fallintoplace marked this pull request as ready for review June 3, 2026 21:25
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