Override existing asar symlink in postinstall (#3369)
This ensures the link is correct. Should fix #3355.
This commit is contained in:
parent
8f82d6e8b9
commit
e64fd451b3
|
@ -63,6 +63,7 @@ VS Code v1.56
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
- fix: Check the logged user instead of $USER #3330 @videlanicolas
|
- fix: Check the logged user instead of $USER #3330 @videlanicolas
|
||||||
|
- fix: Fix broken node_modules.asar symlink in npm package #3355 @code-asher
|
||||||
|
|
||||||
### Documentation
|
### Documentation
|
||||||
|
|
||||||
|
|
|
@ -56,18 +56,21 @@ main() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This is a copy of symlink_asar in ../lib.sh. Look there for details.
|
||||||
|
symlink_asar() {
|
||||||
|
rm -f node_modules.asar
|
||||||
|
if [ "${WINDIR-}" ]; then
|
||||||
|
mklink /J node_modules.asar node_modules
|
||||||
|
else
|
||||||
|
ln -s node_modules node_modules.asar
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
vscode_yarn() {
|
vscode_yarn() {
|
||||||
cd lib/vscode
|
cd lib/vscode
|
||||||
yarn --production --frozen-lockfile
|
yarn --production --frozen-lockfile
|
||||||
|
|
||||||
# This is a copy of symlink_asar in ../lib.sh. Look there for details.
|
symlink_asar
|
||||||
if [ ! -e node_modules.asar ]; then
|
|
||||||
if [ "${WINDIR-}" ]; then
|
|
||||||
mklink /J node_modules.asar node_modules
|
|
||||||
else
|
|
||||||
ln -s node_modules node_modules.asar
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd extensions
|
cd extensions
|
||||||
yarn --production --frozen-lockfile
|
yarn --production --frozen-lockfile
|
||||||
|
|
15
ci/lib.sh
15
ci/lib.sh
|
@ -112,13 +112,12 @@ RELEASE_PATH="${RELEASE_PATH-release}"
|
||||||
# Code itself but also extensions will look specifically in this directory for
|
# Code itself but also extensions will look specifically in this directory for
|
||||||
# files (like the ripgrep binary or the oniguruma wasm).
|
# files (like the ripgrep binary or the oniguruma wasm).
|
||||||
symlink_asar() {
|
symlink_asar() {
|
||||||
if [ ! -L node_modules.asar ]; then
|
rm -f node_modules.asar
|
||||||
if [ "${WINDIR-}" ]; then
|
if [ "${WINDIR-}" ]; then
|
||||||
# mklink takes the link name first.
|
# mklink takes the link name first.
|
||||||
mklink /J node_modules.asar node_modules
|
mklink /J node_modules.asar node_modules
|
||||||
else
|
else
|
||||||
# ln takes the link name second.
|
# ln takes the link name second.
|
||||||
ln -s node_modules node_modules.asar
|
ln -s node_modules node_modules.asar
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue