Archived
1
0

fix: add node to path (#5598)

* fix: remove deprecated symlink

* refactor: remove deprecation notice

* fixup! refactor: remove deprecation notice

* fix: add node to path

* fixup: shellcheck

* Update src/node/wrapper.ts

Co-authored-by: Asher <ash@coder.com>

* fixup!: fix: remove deprecated symlink

* Update ci/build/build-vscode.sh

Co-authored-by: Asher <ash@coder.com>

* Update ci/build/build-vscode.sh

Co-authored-by: Asher <ash@coder.com>

* fixup: use NODE_EXEC_PATh

* Update ci/build/build-vscode.sh

Co-authored-by: Asher <ash@coder.com>

Co-authored-by: Asher <ash@coder.com>
This commit is contained in:
Joe Previte 2022-09-29 16:02:53 -07:00 committed by GitHub
parent 8629d6a474
commit 3ac2307b5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 23 deletions

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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"],
})