Skip to content

micro-fix(quickstart.ps1): correct npm invocation in powershell script#6816

Open
Leayxz wants to merge 1 commit intoaden-hive:mainfrom
Leayxz:micro-fix/wrong_call_operator
Open

micro-fix(quickstart.ps1): correct npm invocation in powershell script#6816
Leayxz wants to merge 1 commit intoaden-hive:mainfrom
Leayxz:micro-fix/wrong_call_operator

Conversation

@Leayxz
Copy link
Copy Markdown
Contributor

@Leayxz Leayxz commented Mar 26, 2026

Description

  • powerShell supports direct command invocation without requiring the call operator "&"
  • the script used the call operator "&" to invoke npm install and npm run build
  • which caused incorrect command parsing in PowerShell when combined with output redirection "2>&1"
  • This resulted in unexpected errors such as "Unknown command: pm", even though the commands worked correctly when executed manually

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)

Related Issues

  • no issue or PRs related

Changes Made

  • removed the unnecessary use of the call operator "&" and invoked npm commands directly
  • npm commands now execute correctly within the script, aligning with standard PowerShell behavior and eliminating the parsing issue

Testing

  • Unit tests pass (cd core && pytest tests/)
  • Lint passes (cd core && ruff check .)
  • Manual testing performed

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Summary by CodeRabbit

  • Chores
    • Updated the project setup script's build command execution to enhance reliability during the installation and build process.

@Leayxz Leayxz changed the title micro-fix(quickstart): correct npm invocation in powershell script micro-fix(quickstart.ps1): correct npm invocation in powershell script Mar 26, 2026
- powerShell supports direct command invocation without requiring the call operator "&"
- the script used the call operator "&" to invoke `npm install` and `npm run build`
- which caused incorrect command parsing in PowerShell when combined with output redirection "2>&1"
- This resulted in unexpected errors such as "Unknown command: pm", even though the commands worked correctly when executed manually

- removed the unnecessary use of the call operator "&" and invoked npm commands directly
- npm commands now execute correctly within the script, aligning with standard PowerShell behavior and eliminating the parsing issue
@Leayxz Leayxz force-pushed the micro-fix/wrong_call_operator branch from 6ca3049 to b1d6589 Compare March 28, 2026 23:20
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e0e1e8d3-693f-4d92-8343-76fbcbd07d0d

📥 Commits

Reviewing files that changed from the base of the PR and between c3c3075 and b1d6589.

📒 Files selected for processing (1)
  • quickstart.ps1

📝 Walkthrough

Walkthrough

Updated npm command invocations in quickstart.ps1 by removing the PowerShell call operator (&) to run commands directly. The npm install --no-fund --no-audit and npm run build commands are now executed without the call operator, while exit code validation and error handling logic remain unchanged.

Changes

Cohort / File(s) Summary
PowerShell Build Script
quickstart.ps1
Removed call operator (&) from npm command invocations; changed from & npm install ... and & npm run build ... to direct command execution while preserving error handling via $LASTEXITCODE checks.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A rabbit hops through scripts so fine, 🐰
Removing operators—what a sign!
Call or no call, the npm runs true,
Building with speed, tried and new.
Simplicity wins, the path shines bright,
PowerShell flowing just right!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'micro-fix(quickstart.ps1): correct npm invocation in powershell script' is specific and directly reflects the main change—removing the call operator to fix npm command parsing in the PowerShell script.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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