Skip to content

Commit

Permalink
vscode-remote-ssh: Use $VSCODE_AGENT_FOLDER instead of ~/.vscode-server
Browse files Browse the repository at this point in the history
This fixes remote ssh on vscode insiders where the path is
~/.vscode-server-insiders instead of ~/.vscode-server. (NixOS#371686)
  • Loading branch information
sliedes committed Jan 7, 2025
1 parent 8f3e1f8 commit fb37c3a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let
# Use Node from nixpkgs for NixOS hosts
#
serverDir="$HOME/.vscode-server/bin/$COMMIT_ID"
serverDir="$VSCODE_AGENT_FOLDER/bin/$COMMIT_ID"
serverNode="$serverDir/node"
echo "VS Code Node: $serverNode"
Expand Down Expand Up @@ -67,12 +67,12 @@ let
${lib.optionalString useLocalExtensions ''
# Use local extensions
if [ -d $HOME/.vscode/extensions ]; then
if [ -e $HOME/.vscode-server/extensions ]; then
mv $HOME/.vscode-server/extensions $HOME/.vscode-server/extensions.bak
if [ -e $VSCODE_AGENT_FOLDER/extensions ]; then
mv $VSCODE_AGENT_FOLDER/extensions $VSCODE_AGENT_FOLDER/extensions.bak
fi
mkdir -p $HOME/.vscode-server
ln -s $HOME/.vscode/extensions $HOME/.vscode-server/extensions
mkdir -p $VSCODE_AGENT_FOLDER
ln -s $HOME/.vscode/extensions $VSCODE_AGENT_FOLDER/extensions
fi
''}
Expand Down

0 comments on commit fb37c3a

Please sign in to comment.