vscode-extensions.ms-vscode-remote.remote-ssh: fix patch for 0.48.0
This commit is contained in:
parent
d5a81030ec
commit
cc051b46f4
1 changed files with 9 additions and 7 deletions
|
@ -9,21 +9,23 @@ let
|
|||
inherit (vscode-utils) buildVscodeMarketplaceExtension;
|
||||
|
||||
# patch runs on remote machine hence use of which
|
||||
# links to local node if version is 12
|
||||
patch = ''
|
||||
f="/home/''$USER/.vscode-server/bin/''$COMMIT_ID/node"
|
||||
nodePath=''$(which node)
|
||||
if [ -x "''$nodePath" ]; then
|
||||
nodeVersion=''$(node -v)
|
||||
if [[ "${nodeVersion:1:2}" == "12" ]]; then
|
||||
echo PATCH: replacing ''$f with ''$nodePath
|
||||
localNodePath=''$(which node)
|
||||
if [ -x "''$localNodePath" ]; then
|
||||
localNodeVersion=''$(node -v)
|
||||
if [ "\''${localNodeVersion:1:2}" = "12" ]; then
|
||||
echo PATCH: replacing ''$f with ''$localNodePath
|
||||
rm ''$f
|
||||
ln -s ''$nodePath ''$f
|
||||
ln -s ''$localNodePath ''$f
|
||||
fi
|
||||
fi
|
||||
${stdenv.lib.optionalString useLocalExtensions ''
|
||||
# Use local extensions
|
||||
if test -f "~/.vscode/extensions"; then
|
||||
if [ -d ~/.vscode/extensions ]; then
|
||||
if ! test -L "~/.vscode-server/extensions"; then
|
||||
mkdir -p ~/.vscode-server
|
||||
ln -s ~/.vscode/extensions ~/.vscode-server/
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue