diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1d72596e..72a04242 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -318,12 +318,6 @@ jobs: ./test/node_modules/.bin/playwright install-deps ./test/node_modules/.bin/playwright install - # TODO@jsjoeio - this is temp. We need to do an actual fix - - name: Copy node binary to release - run: | - ln -s $(which node) ./release/lib/node - ln -s $(which node) ./release/node - - name: Run end-to-end tests run: CODE_SERVER_TEST_ENTRY=./release yarn test:e2e --global-timeout 840000 @@ -400,12 +394,6 @@ jobs: - name: Start Caddy run: sudo ~/.cache/caddy/caddy start --config ./ci/Caddyfile - # TODO@jsjoeio - this is temp. We need to do an actual fix - - name: Copy node binary to release - run: | - ln -s $(which node) ./release/lib/node - ln -s $(which node) ./release/node - - name: Run end-to-end tests run: CODE_SERVER_TEST_ENTRY=./release yarn test:e2e:proxy --global-timeout 840000 diff --git a/ci/build/build-standalone-release.sh b/ci/build/build-standalone-release.sh index be9f0df7..a297b904 100755 --- a/ci/build/build-standalone-release.sh +++ b/ci/build/build-standalone-release.sh @@ -24,9 +24,6 @@ main() { rsync ./ci/build/code-server.sh "$RELEASE_PATH/bin/code-server" rsync "$node_path" "$RELEASE_PATH/lib/node" - ln -s "./bin/code-server" "$RELEASE_PATH/code-server" - ln -s "./lib/node" "$RELEASE_PATH/node" - pushd "$RELEASE_PATH" npm install --unsafe-perm --omit=dev popd diff --git a/ci/build/build-vscode.sh b/ci/build/build-vscode.sh index b0cf0529..631964d5 100755 --- a/ci/build/build-vscode.sh +++ b/ci/build/build-vscode.sh @@ -23,6 +23,9 @@ copy-bin-script() { # shellcheck disable=SC2016 sed -i.bak 's/^ROOT=\(.*\)$/VSROOT=\1\nROOT="$(dirname "$(dirname "$VSROOT")")"/g' "$dest" sed -i.bak 's/ROOT\/out/VSROOT\/out/g' "$dest" + # We do not want expansion here; this text should make it to the file as-is. + # shellcheck disable=SC2016 + sed -i.bak 's/$ROOT\/node/${NODE_EXEC_PATH:-$ROOT\/lib\/node}/g' "$dest" # Fix Node path on Windows. sed -i.bak 's/^set ROOT_DIR=\(.*\)$/set ROOT_DIR=%~dp0..\\..\\..\\..\r\nset VSROOT_DIR=\1/g' "$dest" diff --git a/ci/build/code-server.sh b/ci/build/code-server.sh index c2bdfc89..801835ea 100755 --- a/ci/build/code-server.sh +++ b/ci/build/code-server.sh @@ -11,14 +11,6 @@ _realpath() { cd "$(dirname "$script")" while [ -L "$(basename "$script")" ]; do - if [ -L "./node" ] && [ -L "./code-server" ] \ - && [ -f "package.json" ] \ - && cat package.json | grep -q '^ "name": "code-server",$'; then - echo "***** Please use the script in bin/code-server instead!" >&2 - echo "***** This script will soon be removed!" >&2 - echo "***** See the release notes at https://github.com/coder/code-server/releases/tag/v3.4.0" >&2 - fi - script="$(readlink "$(basename "$script")")" cd "$(dirname "$script")" done diff --git a/src/node/wrapper.ts b/src/node/wrapper.ts index dde60346..755914bb 100644 --- a/src/node/wrapper.ts +++ b/src/node/wrapper.ts @@ -321,6 +321,7 @@ export class ParentProcess extends Process { env: { ...process.env, CODE_SERVER_PARENT_PID: process.pid.toString(), + NODE_EXEC_PATH: process.execPath, }, stdio: ["pipe", "pipe", "pipe", "ipc"], })