mirror of
https://github.com/danog/code-server.git
synced 2024-11-26 20:34:56 +01:00
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:
parent
8629d6a474
commit
3ac2307b5c
12
.github/workflows/build.yaml
vendored
12
.github/workflows/build.yaml
vendored
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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"],
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user