Skip to content

fix: add node to path #5598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Sep 29, 2022
12 changes: 0 additions & 12 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
3 changes: 0 additions & 3 deletions ci/build/build-standalone-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions ci/build/build-vscode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/${CS_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"
Expand Down
8 changes: 0 additions & 8 deletions ci/build/code-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/node/wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ export class ParentProcess extends Process {
env: {
...process.env,
CODE_SERVER_PARENT_PID: process.pid.toString(),
CS_NODE_EXEC_PATH: process.execPath,
},
stdio: ["pipe", "pipe", "pipe", "ipc"],
})
Expand Down