Skip to content

Commit 6730e5d

Browse files
committed
Copy correct Node into release
Still had the old code that copied the system Node, which in the case of cross-compilation will be the wrong one. Instead copy the one VS Code downloads, which should be for the correct platform.
1 parent b27ceeb commit 6730e5d

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

ci/build/build-release.sh

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ main() {
3636
rsync ./lib/vscode/ThirdPartyNotices.txt "$RELEASE_PATH"
3737

3838
if [ "$KEEP_MODULES" = 1 ]; then
39-
# Copy Node. Package managers may shim their own "node" wrapper into the
40-
# PATH, so run node and ask it for its true path.
41-
local node_path
42-
node_path="$(node -p process.execPath)"
43-
rsync "$node_path" "$RELEASE_PATH/lib/node"
44-
chmod 755 "$RELEASE_PATH/lib/node"
45-
4639
# Copy the code-server launcher.
4740
mkdir -p "$RELEASE_PATH/bin"
4841
rsync ./ci/build/code-server.sh "$RELEASE_PATH/bin/code-server"
@@ -108,11 +101,10 @@ bundle_vscode() {
108101
# npm package so exclude any .gitignore files.
109102
rsync_opts+=(--exclude .gitignore)
110103

111-
# Exclude Node as we will add it ourselves for the standalone and will not
112-
# need it for the npm package.
104+
# Exclude Node since we want to place it in a directory above.
113105
rsync_opts+=(--exclude /node)
114106

115-
# Exclude Node modules. Note that these will already only include production
107+
# Exclude Node. Note that these will already only include production
116108
# dependencies, so if we do keep them there is no need to do any
117109
# post-processing to remove dev dependencies.
118110
if [[ $KEEP_MODULES = 0 ]]; then
@@ -121,6 +113,11 @@ bundle_vscode() {
121113

122114
rsync "${rsync_opts[@]}" "./lib/vscode-reh-web-$VSCODE_TARGET/" "$VSCODE_OUT_PATH"
123115

116+
# Copy the Node binary.
117+
if [[ $KEEP_MODULES = 1 ]]; then
118+
cp "./lib/vscode-reh-web-$VSCODE_TARGET/node" "$RELEASE_PATH/lib"
119+
fi
120+
124121
# Merge the package.json for the web/remote server so we can include
125122
# dependencies, since we want to ship this via NPM.
126123
jq --slurp '.[0] * .[1]' \

0 commit comments

Comments
 (0)