nix-community / nixos-vscode-server

Visual Studio Code Server support in NixOS
MIT License
419 stars 76 forks source link

Tilde does not expand in quotes. Use $HOME. #80

Closed jmgilman closed 7 months ago

jmgilman commented 7 months ago

When attempting to use the latest version, I am getting shellcheck failures:

In /nix/store/fzbcp6k93zyj0krbhmy2s3vfmvc3fwph-auto-fix-vscode-server/bin/auto-fix-vscode-server line 24:
    old_patched_file="~/.vscode-server/.${old_patched_file%%.*}.patched"
                      ^----------------^ SC2088 (warning): Tilde does not expand in quotes. Use $HOME.

In /nix/store/fzbcp6k93zyj0krbhmy2s3vfmvc3fwph-auto-fix-vscode-server/bin/auto-fix-vscode-server line 26:
    old_patched_file="~/.vscode-server/.${old_patched_file%%-*}.patched"
                      ^----------------^ SC2088 (warning): Tilde does not expand in quotes. Use $HOME.

For more information:
  https://www.shellcheck.net/wiki/SC2088 -- Tilde does not expand in quotes. ...
Guusvanmeerveld commented 7 months ago

I had the same issue. Do you have the installPath set to something like ~/.vscode-server? A shell check seems to have been added which makes this not work. I updated my installPath to $HOME/.vscode-server which has fixed the problem for me.

jmgilman commented 7 months ago

Yeah, totally forgot I was setting that value in my config somewhere 😓 Thanks, changing it as recommended fixed the issue.