Make build-for-windows.ps1 fail if install-node-dependencies.sh fails
#2120
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issues
Proposed Changes
The Windows production build was borked in the recent 1.6.4 release because the
postinstallscript inpackage.jsonfailed (specifically,scripts/download-wp-server-files.tsfailed 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 -eininstall-node-dependencies.sh. Instead, we use the shebang line at the top of that script to set the-eflag. However, because we specify that thebashexecutable should be used to run the script inbuild-for-windows.ps1, the shebang line is ignored, and the-eflag is never set.This PR fixes the problem by setting the
-euflags ininstall-node-dependencies.shwith an actualsetcommand, and not in the shebang comment.Testing Instructions
Build for Windowsstep should pass on CIPre-merge Checklist