mirror of https://github.com/coder/code-server.git
Clarify why we need node_modules.asar
This commit is contained in:
parent
121a520447
commit
3aa4ae4539
|
@ -42,14 +42,11 @@ vscode_yarn() {
|
||||||
cd lib/vscode
|
cd lib/vscode
|
||||||
yarn --production --frozen-lockfile
|
yarn --production --frozen-lockfile
|
||||||
|
|
||||||
# VS Code needs a node_modules.asar but that's just a duplicate of stuff we
|
# This is a copy of symlink_asar in ../lib.sh. Look there for details.
|
||||||
# already have in node_modules.
|
|
||||||
if [ ! -e node_modules.asar ]; then
|
if [ ! -e node_modules.asar ]; then
|
||||||
if [ "${WINDIR-}" ]; then
|
if [ "${WINDIR-}" ]; then
|
||||||
# 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 -s node_modules node_modules.asar
|
ln -s node_modules node_modules.asar
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -95,8 +95,13 @@ export OS
|
||||||
# Defaults to release
|
# Defaults to release
|
||||||
RELEASE_PATH="${RELEASE_PATH-release}"
|
RELEASE_PATH="${RELEASE_PATH-release}"
|
||||||
|
|
||||||
# Symlink node_modules.asar to node_modules. VS Code needs a node_modules.asar
|
# VS Code bundles some modules into an asar which is an archive format that
|
||||||
# but that's just a duplicate of stuff we already have in node_modules.
|
# works like tar. It then seems to get unpacked into node_modules.asar.
|
||||||
|
#
|
||||||
|
# I don't know why they do this but all the dependencies they bundle already
|
||||||
|
# exist in node_modules so just symlink it. We have to do this since not only VS
|
||||||
|
# Code itself but also extensions will look specifically in this directory for
|
||||||
|
# files (like the ripgrep binary or the oniguruma wasm).
|
||||||
symlink_asar() {
|
symlink_asar() {
|
||||||
if [ ! -e node_modules.asar ]; then
|
if [ ! -e node_modules.asar ]; then
|
||||||
if [ "${WINDIR-}" ]; then
|
if [ "${WINDIR-}" ]; then
|
||||||
|
|
Loading…
Reference in New Issue