mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
## Summary - Replaces empty placeholder executables with shell scripts that print helpful error messages - The scripts exit with code 1 instead of silently succeeding with code 0 - Helps users diagnose issues when installing with `--ignore-scripts` or using pnpm ## Problem When installing the `bun` npm package with `--ignore-scripts` or using pnpm (which skips postinstall by default), the placeholder `bun.exe` and `bunx.exe` files were empty, causing them to silently exit with code 0 and produce no output. This made it very difficult for users to understand why bun wasn't working. ## Solution The placeholder files are now shell scripts that: 1. Print a clear error message explaining the issue 2. Provide instructions on how to fix it (manually running postinstall or reinstalling without `--ignore-scripts`) 3. Exit with code 1 to indicate failure Example output when running the placeholder: ``` Error: Bun's postinstall script was not run. This occurs when using --ignore-scripts during installation, or when using a package manager like pnpm that does not run postinstall scripts by default. To fix this, run the postinstall script manually: cd node_modules/bun && node install.js Or reinstall bun without the --ignore-scripts flag. ``` ## Test plan - [x] Added regression test that verifies the placeholder script behavior - [x] Test passes with `bun bd test test/regression/issue/24329.test.ts` Fixes #24329 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Bot <claude-bot@bun.sh> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>