fix(installer): show help text on error and document --profile full#963
fix(installer): show help text on error and document --profile full#963
Conversation
…n README Running install.ps1/install.sh with no arguments gave a cryptic error with no guidance. Now the usage help is printed after the error so users know what arguments to pass. Also added --profile full as the recommended install option in the README quick-start section, which was previously undocumented. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ream output Extracted help text into getHelpText() and write both the error message and usage help to stderr via process.stderr.write(). This ensures that when output is redirected (e.g. 2>errors.txt), both the error and the guidance appear in the same stream. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
affaan-m has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughRefined README install instructions (adds Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
scripts/install-apply.js (1)
143-146: Minor formatting nit: extra blank line in error output.
getHelpText()returns a string starting with\n(line 22), so combined with\n\nhere, the output will have three consecutive newlines between the error and usage text. Consider either removing one\nhere or trimming the leading newline fromgetHelpText().🔧 Optional fix
- process.stderr.write(`Error: ${error.message}\n\n${getHelpText()}`); + process.stderr.write(`Error: ${error.message}\n${getHelpText()}`);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/install-apply.js` around lines 143 - 146, The error output currently produces an extra blank line because getHelpText() already starts with a leading newline; update the catch block that calls process.stderr.write (the try/catch around the install/apply flow) to avoid double newlines by either removing one of the `\n` in the template string or by trimming the leading newline from getHelpText() so the final write uses a single newline between the error message and the help text; adjust the call site or the getHelpText() function accordingly to ensure exactly one newline separation.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@scripts/install-apply.js`:
- Around line 143-146: The error output currently produces an extra blank line
because getHelpText() already starts with a leading newline; update the catch
block that calls process.stderr.write (the try/catch around the install/apply
flow) to avoid double newlines by either removing one of the `\n` in the
template string or by trimming the leading newline from getHelpText() so the
final write uses a single newline between the error message and the help text;
adjust the call site or the getHelpText() function accordingly to ensure exactly
one newline separation.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ec0b8427-cdc4-4e17-9e39-9a6f56c2fa04
📒 Files selected for processing (2)
README.mdscripts/install-apply.js
There was a problem hiding this comment.
affaan-m has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
There was a problem hiding this comment.
affaan-m has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
There was a problem hiding this comment.
affaan-m has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
Summary
Verification
Summary by cubic
Improve installer UX by showing usage help on parse errors and sending it to stderr with the error; quick-start now recommends
--profile full. CI now supportsyarn4 andpnpminstalls viaCorepackshims and relaxedpnpmstrict mode.getHelpText()and route error-path help to stderr for consistent redirects.Corepack, setCOREPACK_ENABLE_STRICT=0forpnpm, and useyarninstall--mode=skip-buildto supportyarn4 andpnpmin the matrix.Written for commit cc13a51. Summary will update on new commits.
Summary by CodeRabbit
Documentation
Refactor
Chores