diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2019-12-26 06:33:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-26 06:33:50 +0000 |
commit | 38c3a43c0c403c00925212c8a956e0ea3c16b089 (patch) | |
tree | 53417172b1ef7e4b19c07b07b22acd1b3579270a | |
parent | 470c8a2a36dc6c20762d8ba8fb206a88101b8bde (diff) | |
parent | cc051b46f4478e2c5d97059d80d3e5d45cf16ddb (diff) | |
download | nixlib-38c3a43c0c403c00925212c8a956e0ea3c16b089.tar nixlib-38c3a43c0c403c00925212c8a956e0ea3c16b089.tar.gz nixlib-38c3a43c0c403c00925212c8a956e0ea3c16b089.tar.bz2 nixlib-38c3a43c0c403c00925212c8a956e0ea3c16b089.tar.lz nixlib-38c3a43c0c403c00925212c8a956e0ea3c16b089.tar.xz nixlib-38c3a43c0c403c00925212c8a956e0ea3c16b089.tar.zst nixlib-38c3a43c0c403c00925212c8a956e0ea3c16b089.zip |
Merge pull request #76492 from tbenst/remote-ssh-fix
vscode-extensions.ms-vscode-remote.remote-ssh: fix patch for 0.48.0
-rw-r--r-- | pkgs/misc/vscode-extensions/remote-ssh/default.nix | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/pkgs/misc/vscode-extensions/remote-ssh/default.nix b/pkgs/misc/vscode-extensions/remote-ssh/default.nix index c6750a6c94ec..fe053dd7ea3d 100644 --- a/pkgs/misc/vscode-extensions/remote-ssh/default.nix +++ b/pkgs/misc/vscode-extensions/remote-ssh/default.nix @@ -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 |