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

Command Not Found unable to detect PowerShell 7.4 or above #30893

Closed
CesarSant2000 opened this issue Jan 11, 2024 · 7 comments
Closed

Command Not Found unable to detect PowerShell 7.4 or above #30893

CesarSant2000 opened this issue Jan 11, 2024 · 7 comments
Labels
Issue-Bug Something isn't working Needs-Team-Response An issue author responded so the team needs to follow up Product-CommandNotFound Refers to Command Not Found PowerToy

Comments

@CesarSant2000
Copy link

Microsoft PowerToys version

0.77.0

Installation method

GitHub

Running as admin

Yes

Area(s) with issue?

General

Steps to reproduce

Go to the new Command not found module
It will show that you don't have powershell 7.4 or above because it's only searching for the included version and not the one on program and files

✔️ Expected Behavior

Work fine

❌ Actual Behavior

Not working

Other Software

No response

@CesarSant2000 CesarSant2000 added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Jan 11, 2024
@glenncarr
Copy link

Same issue here:
image

@jaimecbernardo jaimecbernardo added the Product-CommandNotFound Refers to Command Not Found PowerToy label Jan 11, 2024
@jaimecbernardo
Copy link
Collaborator

@glenncarr @CesarSant2000 , PowerToys tries to use the pwsh.exe it finds on PATH.
For example if you try to run (Win+R) "pwsh.exe" which version do you get?

/needinfo

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Jan 11, 2024
@glenncarr
Copy link

glenncarr commented Jan 11, 2024

@jaimecbernardo
image

EDIT: Starting from Run, it brings up the 64-bit version (7.4.0)

@glenncarr
Copy link

@jaimecbernardo I uninstalled the x86 version and all is well. Thank you!

@jaimecbernardo
Copy link
Collaborator

@jaimecbernardo I uninstalled the x86 version and all is well. Thank you!

Thanks for the feedback!
Although I'm not quite sure why it would pick up the x86 version 😆
We're using ProcessStartInfo from C#. Perhaps the x86 appears first in the path resolution logic.

@CesarSant2000
Copy link
Author

That was exactly my problem, in the path the x86 version was first and it was taking it. I just move the order in the path and it's working just fine.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jan 11, 2024
@nguyen-dows nguyen-dows removed the Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams label Jan 26, 2024
@nguyen-dows
Copy link

Glad you found the fix, @CesarSant2000 and @glenncarr. I'll be marking this resolved and renaming the issue to help others find it in the future. If you run into any problems, feel free to open a new issue. Thanks! :)

@nguyen-dows nguyen-dows changed the title Command Not Found Command Not Found unable to detect PowerShell 7.4 or above Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Something isn't working Needs-Team-Response An issue author responded so the team needs to follow up Product-CommandNotFound Refers to Command Not Found PowerToy
Projects
None yet
Development

No branches or pull requests

4 participants