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

[CommandNotFound]Known incompatibilities #30818

Open
jaimecbernardo opened this issue Jan 8, 2024 · 15 comments
Open

[CommandNotFound]Known incompatibilities #30818

jaimecbernardo opened this issue Jan 8, 2024 · 15 comments
Labels
Issue-Bug Something isn't working Product-CommandNotFound Refers to Command Not Found PowerToy

Comments

@jaimecbernardo
Copy link
Collaborator

jaimecbernardo commented Jan 8, 2024

Microsoft PowerToys version

0.77.0

Area(s) with issue?

Command Not Found

Steps to reproduce

Some incompatibilities for Command Not Found that are known at the time of the 0.77 release:

[ ] It doesn't work with PowerShell installed from MSIX or from the Microsoft Store, since we depend on https://www.powershellgallery.com/packages/Microsoft.WinGet.Client/1.6.3133.0 which doesn't work for those cases.
[ ] There's no PowerShell 7.4 MSI installer for arm64, so arm64 isn't currently supported.
[ ] Trying to update to PowerShell 7.4 from the Settings page fails for some cases. It's recommended to try to update manually in these cases.

Further issues may be added as users report it.

@jaimecbernardo jaimecbernardo added Issue-Bug Something isn't working Product-CommandNotFound Refers to Command Not Found PowerToy labels Jan 8, 2024
@jaimecbernardo jaimecbernardo pinned this issue Jan 8, 2024
@jaimecbernardo
Copy link
Collaborator Author

The issue about WInGet Client not working when updated from the store is opened here: microsoft/winget-cli#3805

@htcfreek
Copy link
Collaborator

htcfreek commented Jan 9, 2024

@jaimecbernardo
We can't detect pwsh from store if the path variable is not manually updated to contain the pwsh path.

@tahayparker
Copy link

what about msi? i installed the msi version a couple minutes ago and the module does not work

@htcfreek
Copy link
Collaborator

htcfreek commented Jan 9, 2024

what about msi? i installed the msi version a couple minutes ago and the module does not work

@tahayparker
Did you restarted PowerToys application. I had to restart it that the settings app saw my environment variable change. (Not 100% if the reload button maybe doesn't work. 🤔)

@CeelB-2055440
Copy link

I want to add to this issue that when CommandNotFound is working properly; it keeps turning off. When I restart my computer, or when I restart Powertoys, I have to enable it again.

@soredake
Copy link

[ ] It doesn't work with PowerShell installed from MSIX or from the Microsoft Store, since we depend on powershellgallery.com/packages/Microsoft.WinGet.Client/1.6.3133.0 which doesn't work for those cases.

Will PowerShell from MSIX/Store be supported in the future?

@Shyclops
Copy link

When running on powershell 7.5 preview it fails to import the module with the following error message

PowerShell 7.5.0-preview.1
Import-Module: D:\Root\Documents\PowerShell\Microsoft.PowerShell_profile.ps1:696
Line |
 696 |  Import-Module "C:\Program Files\PowerToys\WinUI3Apps\..\WinGetCommand …
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Could not load file or assembly 'PowerToys.CmdNotFound, Version=0.77.0.0, Culture=neutral, PublicKeyToken=null'.
Loading personal and system profiles took 1242ms.

@a-usr
Copy link

a-usr commented Feb 7, 2024

The Dotnet Tool version of Powershell is also incompatible

@FlawlessCasual17
Copy link

I know this is out of topic, but will this powertoys module also allow the use of other popular package managers like scoop and chocolatey?

@a-usr
Copy link

a-usr commented Feb 29, 2024

will this powertoys module also allow the use of other popular package managers like scoop and chocolatey?

As long as powershell is installed in PATH and doesnt have some weird quirks like the dotnet tool version it should (!) work

@FlawlessCasual17
Copy link

FlawlessCasual17 commented Feb 29, 2024

That's not what I meant. I was talking integration with the PowerShell module that is the topic of this thread.

@a-usr
Copy link

a-usr commented Feb 29, 2024

That's not what I meant. I was talking integration with the PowerShell module that is the topic of this thread.

In that case you should have clarified it better. For example by writing " [...] like scoop and chocolatey to install programs?".

To answer your question, the documentation only states WinGet as a package source, so no, neither Scoop nor chocolatey seem to be supported.

@Starstrike
Copy link

will this powertoys module also allow the use of other popular package managers like scoop and chocolatey?

As long as powershell is installed in PATH and doesnt have some weird quirks like the dotnet tool version it should (!) work

Adding the location to the store version of Powershell doesn't seem to do anything. In Process Explorer, I see the WindowsPackageManagerServer start and end but I see nothing different when trying out tests for this, like vim (something I don't have installed). Tells me the command doesn't exist and doesn't give any suggestions, despite Command Not Found being installed. This is when running Terminal as admin.

When running it without admin, command not found gives an error:

"[Windows Package Manager - WinGet]
Failed to execute PowerToys Command Not Found.
This is a known issue if PowerShell 7 is installed from the Store or MSIX. If that isn't your case, please report an issue."

Hopefully this is something that can be figured out at some point. Seems like a very handy tool, but it's not worth having to update Powershell manually for me just for this to work.

@a-usr
Copy link

a-usr commented Mar 5, 2024

Adding the location to the store version of Powershell doesn't seem to do anything. In Process Explorer, I see the WindowsPackageManagerServer start and end but I see nothing different when trying out tests for this, like vim (something I don't have installed). Tells me the command doesn't exist and doesn't give any suggestions, despite Command Not Found being installed. This is when running Terminal as admin.

yes, as you have noticed and might even have read in the description of this Issue, the ms store and msix version of powershell is incompatible because of some incompatibility involving either Winget or the Powershell Gallery, and said powershell version(s)

@StevenBucher98
Copy link

PowerShell 7.5.0-preview.2 now has an MSI installer for ARM64 windows. https://github.com/PowerShell/PowerShell/releases/tag/v7.5.0-preview.2

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 Product-CommandNotFound Refers to Command Not Found PowerToy
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

10 participants