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 does not detect PowerShell Preview properly #32891

Closed
CodingWonders opened this issue May 17, 2024 · 1 comment
Closed

Command not found does not detect PowerShell Preview properly #32891

CodingWonders opened this issue May 17, 2024 · 1 comment
Labels
Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams

Comments

@CodingWonders
Copy link

Microsoft PowerToys version

0.80.1

Installation method

PowerToys auto-update

Running as admin

Yes

Area(s) with issue?

Command not found

Steps to reproduce

Command Not Found does not seem to detect PowerShell Preview properly, so the log tells the user that PS is not installed, even though it is:

PowerToys Settings error

PowerShell Preview

Bug report

PS: looking at the function, it seems that it tries to detect pwsh-preview.cmd, which is not present. The only thing present is pwsh-preview.exe.

if (File.Exists(Path.Combine(pathCandidate, "pwsh-preview.cmd")))
{
    result = RunPowerShellScript(Path.Combine(pathCandidate, "pwsh-preview.cmd"), arguments, true);
    if (result.Contains("PowerShell 7.4 or greater detected."))
    {
        isPowerShellPreviewDetected = true;
        IsPowerShell7Detected = true;
        powerShellPreviewPath = pathCandidate;
        break;
    }
}

Could this be the exact issue?

✔️ Expected Behavior

PowerToys detects the PowerShell Preview executable

❌ Actual Behavior

It throws the error as mentioned earlier

Other Software

PowerShell 7.5 Preview 2

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

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@CodingWonders CodingWonders closed this as not planned Won't fix, can't repro, duplicate, stale May 28, 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-Triage For issues raised to be triaged and prioritized by internal Microsoft teams
Projects
None yet
Development

No branches or pull requests

1 participant