Archived
1
0

Override existing asar symlink in postinstall (#3369)

This ensures the link is correct. Should fix #3355.
This commit is contained in:
Asher
2021-05-12 16:46:29 -05:00
committed by GitHub
parent 8f82d6e8b9
commit e64fd451b3
3 changed files with 19 additions and 16 deletions

View File

@ -112,13 +112,12 @@ RELEASE_PATH="${RELEASE_PATH-release}"
# Code itself but also extensions will look specifically in this directory for
# files (like the ripgrep binary or the oniguruma wasm).
symlink_asar() {
if [ ! -L node_modules.asar ]; then
if [ "${WINDIR-}" ]; then
# mklink takes the link name first.
mklink /J node_modules.asar node_modules
else
# ln takes the link name second.
ln -s node_modules node_modules.asar
fi
rm -f node_modules.asar
if [ "${WINDIR-}" ]; then
# mklink takes the link name first.
mklink /J node_modules.asar node_modules
else
# ln takes the link name second.
ln -s node_modules node_modules.asar
fi
}