Skip to content

Fix js_run_devserver shell script tools on Windows#2393

Merged
jbedard merged 1 commit intoaspect-build:mainfrom
AlexHickie:fix-devserver-script-windows
Oct 13, 2025
Merged

Fix js_run_devserver shell script tools on Windows#2393
jbedard merged 1 commit intoaspect-build:mainfrom
AlexHickie:fix-devserver-script-windows

Conversation

@AlexHickie
Copy link
Copy Markdown
Contributor

On Windows, when js_run_devserver is run with a batch script tool (like js_binary targets) node returns Error: spawn EINVAL at child_process.spawn. This is because these script files are always run under a shell on Windows so nodejs requires the shell flag to be set per the CVE-2024-27980.

This PR only enables the shell flag for bat and cmd files on Windows to restore the previous behaviour.

Closes #2348


Changes are visible to end-users: no

This was the existing behaviour before the CVE fix broke it.

Test plan

  • Covered by existing test cases
  • Manual testing; please provide instructions so we can reproduce: Run js_run_devserver with a js_binary tool on Windows

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Oct 12, 2025

CLA assistant check
All committers have signed the CLA.

@aspect-workflows
Copy link
Copy Markdown

aspect-workflows Bot commented Oct 12, 2025

Test

All tests were cache hits

278 tests (100.0%) were fully cached saving 36s.


Test

e2e/bzlmod

All tests were cache hits

5 tests (100.0%) were fully cached saving 618ms.


Test

e2e/git_dep_metadata

Waiting for runner...


Test

e2e/gyp_no_install_script

All tests were cache hits

2 tests (100.0%) were fully cached saving 173ms.


Test

e2e/js_image_oci

All tests were cache hits

1 test (100.0%) was fully cached saving 7s.


Test

e2e/npm_link_package

All tests were cache hits

3 tests (100.0%) were fully cached saving 407ms.


Test

e2e/npm_link_package-esm

All tests were cache hits

3 tests (100.0%) were fully cached saving 484ms.


Test

e2e/npm_link_package-rerooted

Waiting for runner...


Test

e2e/npm_translate_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Test

e2e/npm_translate_lock_disable_hooks

Waiting for runner...


Test

e2e/npm_translate_lock_empty

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Test

e2e/npm_translate_lock_exclude_package_contents

Waiting for runner...


Test

e2e/npm_translate_lock_multi

All tests were cache hits

2 tests (100.0%) were fully cached saving 164ms.


Test

e2e/npm_translate_lock_partial_clone

All tests were cache hits

1 test (100.0%) was fully cached saving 61ms.


Test

e2e/npm_translate_lock_replace_packages

All tests were cache hits

3 tests (100.0%) were fully cached saving 373ms.


Test

e2e/npm_translate_lock_subdir_patch

All tests were cache hits

1 test (100.0%) was fully cached saving 95ms.


Test

e2e/npm_translate_package_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Test

e2e/npm_translate_yarn_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 31ms.


Test

e2e/package_json_module

All tests were cache hits

1 test (100.0%) was fully cached saving 348ms.


Test

e2e/patch_from_repo

Waiting for runner...


Test

e2e/pnpm_lockfiles

All tests were cache hits

67 tests (100.0%) were fully cached saving 10s.


Test

e2e/pnpm_repo_install

Waiting for runner...


Test

e2e/pnpm_workspace

All tests were cache hits

15 tests (100.0%) were fully cached saving 3s.


Test

e2e/pnpm_workspace_deps

Waiting for runner...


Test

e2e/pnpm_workspace_rerooted

All tests were cache hits

15 tests (100.0%) were fully cached saving 5s.


Test

e2e/repo_mapping

All tests were cache hits

3 tests (100.0%) were fully cached saving 454ms.


Test

e2e/rules_foo

All tests were cache hits

2 tests (100.0%) were fully cached saving 258ms.


Test

e2e/runfiles

All tests were cache hits

1 test (100.0%) was fully cached saving 118ms.


Test

e2e/stamped_package_json

Waiting for runner...


Test

e2e/vendored_node

All tests were cache hits

1 test (100.0%) was fully cached saving 78ms.


Test

e2e/vendored_tarfile

Waiting for runner...


Test

e2e/verify_patches

Waiting for runner...


Test

e2e/worker

Waiting for runner...


Test

e2e/workspace

Waiting for runner...


Buildifier      Format

Copy link
Copy Markdown
Member

@jbedard jbedard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@jbedard jbedard enabled auto-merge (rebase) October 12, 2025 22:42
@jbedard jbedard merged commit 570b3eb into aspect-build:main Oct 13, 2025
99 checks passed
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.

[Bug]: js_run_devserver errors on windows

3 participants