Skip to content
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

Binary named 'nim' not found in PATH environment variable, even when nim exists in PATH #136

Open
MKuranowski opened this issue Nov 27, 2023 · 3 comments

Comments

@MKuranowski
Copy link

None of the extension's features work. When executing Nim: Check nim project an error message Binary named 'nim' not found in PATH environment variable pops up.

It makes no sense; I have nim downloaded into Documents and symlinked to from $HOME/.local/share/bin, which exists in PATH.

$ echo "$PATH"
/home/mikolaj/.local/share/bin:/home/mikolaj/.local/bin:/home/mikolaj/.local/share/go/bin:/home/mikolaj/.local/share/cargo/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
$ which nim
/home/mikolaj/.local/share/bin/nim
$ stat "$(which nim)"
  File: /home/mikolaj/.local/share/bin/nim -> /home/mikolaj/Documents/External-Software/nim/bin/nim
  Size: 53              Blocks: 8          IO Block: 4096   symbolic link
...
@MKuranowski
Copy link
Author

Even if PATH literally points to the binary (not just a symlink) this issue persists

$ echo "$PATH"
/home/mikolaj/.local/share/bin:/home/mikolaj/.local/bin:/home/mikolaj/.local/share/go/bin:/home/mikolaj/.local/share/cargo/bin:/home/mikolaj/Documents/External-Software/nim/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
$ which nim
/home/mikolaj/Documents/External-Software/nim/bin/nim
$ stat "$(which nim)"
  File: /home/mikolaj/Documents/External-Software/nim/bin/nim
  Size: 9114160         Blocks: 17808      IO Block: 4096   regular file
...

@MKuranowski
Copy link
Author

Note that /home/mikolaj/.local/share/bin/ or /home/mikolaj/Documents/External-Software/nim/bin/ are added to the path in $HOME/.zshrc; which would normally not be visible to programs launched from a DE.

However, VS Code sources .zshrc so this should not be a problem.

@MKuranowski
Copy link
Author

Launching VS Code from terminal (with changed PATH) makes the extension work.

This should mean that the extension does not properly inherit/query VS Code environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant