@@ -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,19 +101,23 @@ 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
116- # dependencies, so if we do keep them there is no need to do any
107+ # Exclude Node and Node modules. Note that these will already only include
108+ # production 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
119111 rsync_opts+=(--exclude node_modules)
120112 fi
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