-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wget not found even though wget is installed #7
Comments
Yes you are right and I'm supposing that the command is not executed as user Instead of adding
|
Thansk for the reply!
Still wasn't able to access wget from After messing around a bit, I was able to modify NixOS-WSL to get diff --git a/modules/systemd/native/default.nix b/modules/systemd/native/default.nix
index f641580..ae0afc6 100644
--- a/modules/systemd/native/default.nix
+++ b/modules/systemd/native/default.nix
@@ -7,7 +7,7 @@ with lib; {
nativeUtils = pkgs.callPackage ../../../utils { };
bashWrapper = pkgs.writeShellScriptBin "sh" ''
- export PATH="$PATH:${lib.makeBinPath [ pkgs.systemd pkgs.gnugrep ]}"
+ export PATH="$PATH:${lib.makeBinPath [ pkgs.systemd pkgs.gnugrep pkgs.wget ]}"
exec ${pkgs.bashInteractive}/bin/sh "$@"
'';
in This seems to have fixed it, although obviosuly I had to modify NixOS-WSL which is a bit of a pain. Do you think this is related to a recent update to the way vs code is installing the sever? Did it used to use the WSL default shell for each distor instead of directly using |
Could you give details about what has been changed with vscode? I updated my environment and my vscode can download the server with any problem. (I updated vscode, WSL extension, and NixOS-WSL) Strangely, the command you provided are not working for me as well: >wsl -d NixOS -e sh "wget"
/nix/store/x88ivkf7rmrhd5x3cvyv5vh3zqqdnhsk-bash-interactive-5.2-p15/bin/sh: wget: No such file or directory |
I think I figured out what's going on here.
>wsl -d NixOS sh -c ls
/nix/store/x88ivkf7rmrhd5x3cvyv5vh3zqqdnhsk-bash-interactive-5.2-p15/bin/sh: line 1: ls: command not found
Thus, when
In other words, I think it has nothing to do with the recent update and the cause is that |
Hey thanks for following up. Sorry for disapearing, the whole thing completely fell out of my mind for a while haha.
I am pretty sure I tried putting it in system package with no luck, but if I get a chance ill give it another shoot. What your saying makes sense so im inclinded to believe I just made a mistake when doing it. |
This might be realted to #6 but not 100% sure. Still a bit new to NixOS so forgive me if I missed anything obvious.
Installed wget as instructed but im getting an error when I try to connect saying that wget is not installed:
wget installation:
system info:
I was able to get everything working by running
code .
directly into the NixOS terminal as suggested by the vscode troubleshooting docs, but since that isn't mentioned anywhere in the readme I wanted to see if I was missing anything.I did note that some of the earlier logs suggested that vscode was running shell commands using
wsl -d NixOS -e sh "<command>"
. When I try to access wget through this method I get a "command not found" error. I assume using "sh" directly like this skips setting up PATH properly in Nix. Im not sure how vscode calls wget for the server install so this may be unrelated.p.s. other than this minor issue, script works great! Thanks for sharing!
The text was updated successfully, but these errors were encountered: