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

Some commands don't work in Windows #73

Open
Marin-Kitagawa opened this issue Apr 8, 2024 · 2 comments
Open

Some commands don't work in Windows #73

Marin-Kitagawa opened this issue Apr 8, 2024 · 2 comments

Comments

@Marin-Kitagawa
Copy link

Describe the bug
The commands such as ls, dir, and many other Powershell commands such as Get-Clipboard search for an exectuable in $env:PATH or %PATH%. The following is the error thrown

exec: "ls": executable file not found in %PATH%

(Replace ls with any other Powershell command that produces an output)

Since it explicitly mentions %PATH% (instead of $env:PATH), I even tried the same command in cmd (I was using PowerShell 7 previously). I still got the same error.

To Reproduce
Steps to reproduce the behavior:

  1. Open Windows Terminal (with either Powershell or Command Prompt profile)
  2. Type freeze --execute "ls", freeze --execute "dir" or freeze --execute "<any powershell command>"
  3. You'll now see the error

Expected behavior
All the Windows-native or Powershell commands must work

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 11 Version: 10.0.22631.3374
@maaslalani
Copy link
Contributor

Hey @Marin-Kitagawa can you try the following:

freeze --execute "cmd /c ls"
freeze --execute "cmd /c dir"

@Marin-Kitagawa
Copy link
Author

This works. But I understand that Linux has binaries for each command be it ls or anything. But in Windows, is it possible to emulate the same function similar to Linux but not checking for availability of a binary in the PATH? I mean, could you please make it to execute directly in the default shell (without using any alias)?

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