Skip to content

fix(cli): quote Windows shell args for background processes - #2333

Closed
simoncrypta wants to merge 1 commit into
cedarjs:mainfrom
simoncrypta:fix/windows-shell-quote-background
Closed

fix(cli): quote Windows shell args for background processes#2333
simoncrypta wants to merge 1 commit into
cedarjs:mainfrom
simoncrypta:fix/windows-shell-quote-background

Conversation

@simoncrypta

Copy link
Copy Markdown
Contributor

Summary

  • Quote cmd.exe / shell: true arguments in spawnBackgroundProcess so paths with spaces (e.g. CI test project) do not split into truncated MODULE_NOT_FOUND failures
  • Escape backslashes per CommandLineToArgvW rules (CodeQL / incomplete escaping)
  • Pipe Playwright webServer stderr in smoke configs for clearer failure output

Split out of #2283 so that PR stays focused on @cedarjs/pg local Postgres integration.

Test plan

  • Windows CLI / telemetry background spawn with a path containing spaces
  • Smoke tests (dev/serve) still start and surface stderr when the webServer fails
  • CodeQL no longer flags incomplete escaping on quoteWindowsShellArg

@netlify

netlify Bot commented Aug 5, 2026

Copy link
Copy Markdown

👷 Deploy request for cedarjs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 7de8222

@github-actions github-actions Bot added this to the next-release-patch milestone Aug 5, 2026
@nx-cloud

nx-cloud Bot commented Aug 5, 2026

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit e2d1b4c

Command Status Duration Result
nx run-many -t build:pack --exclude create-ceda... ✅ Succeeded 1s View ↗
nx run-many -t build --output-style=stream ✅ Succeeded 2s View ↗
nx run-many -t test --maxWorkers=4 ✅ Succeeded 1m 24s View ↗
nx run-many -t test:types ✅ Succeeded 10s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-08-05 15:54:52 UTC

Comment thread packages/cli/src/lib/background.ts
Telemetry and update-check spawn with shell: true on Windows. Paths with
spaces were split into extra argv tokens, so Node loaded a truncated
module and threw MODULE_NOT_FOUND.
@simoncrypta
simoncrypta force-pushed the fix/windows-shell-quote-background branch from e2d1b4c to 7de8222 Compare August 31, 2026 02:33
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

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.

2 participants