Skip to content

Conversation

@fredrikekelund
Copy link
Contributor

@fredrikekelund fredrikekelund commented Nov 25, 2025

Related issues

Proposed Changes

The Windows production build was borked in the recent 1.6.4 release because the postinstall script in package.json failed (specifically, scripts/download-wp-server-files.ts failed due to GitHub rate limits on the SQLite plugin download). This should have caused the entire build to fail, but it didn't.

The reason it didn't is that we don't call set -e in install-node-dependencies.sh. Instead, we use the shebang line at the top of that script to set the -e flag. However, because we specify that the bash executable should be used to run the script in build-for-windows.ps1, the shebang line is ignored, and the -e flag is never set.

This PR fixes the problem by setting the -eu flags in install-node-dependencies.sh with an actual set command, and not in the shebang comment.

Testing Instructions

  1. The Build for Windows step should pass on CI

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@fredrikekelund fredrikekelund requested review from a team and mokagio November 25, 2025 10:36
@fredrikekelund fredrikekelund self-assigned this Nov 25, 2025
Copy link
Contributor

@AliSoftware AliSoftware left a comment

Choose a reason for hiding this comment

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

What do you think about instead removing the -eu from the shebang of the install-node-dependencies.sh and replacing it with an explicit call to set -eu in that same file right after that shebang?

That way the onus would still be on the install-node-dependencies.sh to set those flags itself, rather than expecting the caller (that one .ps1 script for the time being but maybe more scripts would call it in the future) to remember to use bash -eu when calling it.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 25, 2025

📊 Performance Test Results

Comparing e702179 vs trunk

site-editor

Metric trunk e702179 Diff Change
load 9654.00 ms 12484.00 ms +2830.00 ms 🔴 29.3%

site-startup

Metric trunk e702179 Diff Change
siteCreation 26335.00 ms 23306.00 ms -3029.00 ms 🟢 -11.5%
siteStartup 9101.00 ms 9096.00 ms -5.00 ms 🟢 -0.1%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change

@fredrikekelund
Copy link
Contributor Author

@AliSoftware, good call. I've made that change 👍

Copy link
Contributor

@gcsecsey gcsecsey left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@fredrikekelund fredrikekelund merged commit 65826db into trunk Nov 25, 2025
10 checks passed
@fredrikekelund fredrikekelund deleted the f26d/exit-flag-for-node-dependencies-script-on-windows branch November 25, 2025 12:45
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.

5 participants