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

Error: exec: executable file not found in %PATH% #51

Open
LoZeno opened this issue May 25, 2022 · 3 comments
Open

Error: exec: executable file not found in %PATH% #51

LoZeno opened this issue May 25, 2022 · 3 comments

Comments

@LoZeno
Copy link

LoZeno commented May 25, 2022

On windows, tldr is unable to execute the commands once selected:

>tldr winget

winget

Windows Package Manager CLI.
More information: <https://docs.microsoft.com/windows/package-manager/winget>.

  Search for a package
   winget search package

$ package -> terminal
? winget search terminal Yes
exec: "winget": executable file not found in %PATH%

The error message is incorrect since winget is, indeed, in my PATH

@isacikgoz
Copy link
Owner

Hmm, I need to test this but in theory it just calls exec.Command and it should be able to run if it's in the PATH, is it only specific to this tool or a general issue?

@LoZeno
Copy link
Author

LoZeno commented Jan 17, 2023

So far I have this behaviour only for winget, docker and gnu commands installed with MinGW like ls:

> tldr ls

ls

List directory contents.
More information: <https://www.gnu.org/software/coreutils/ls>.

  List all files, including hidden files
   ls -a

? ls -a Yes
exec: "ls": executable file not found in %PATH%

They are all in the PATH, e.g. winget is installed in ~\AppData\Local\Microsoft\WindowsApps\winget.exe and when I print my PATH I see ~\AppData\Local\Microsoft\WindowsApps in it.

@isacikgoz
Copy link
Owner

Thanks for the detailed info @LoZeno it seems like we additionally add \c while running such commands, I'll look into this. Or if you prefer adding this feautre (btw, this should only be compiled for windows) feel free to do so.

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

2 participants