Open some-sh opened 3 weeks ago
There was a new feature that - when given an unknown command, would lookup that command against winget list
, and suggest any matches to package name, moniker, or commands. Or something very similar to this.
Related tangent: The package manager performs its matching against a copy of the repo stored in source.msix - if this file is more than 5 minutes old, it downloads a new copy, which might take several seconds.
It sounds like this feature might expect an Internet connection, and pre-seed the download process by calling winget list
on startup. This way, when a user types vi textfile.txt
on a new system, the shell can respond with something similar to "Try winget install vim".
Is it possible that this feature was released without testing the situation of not having an Internet connection?
This is caused by the PowerToys CommandNotFound module
Related issues in the relevant repositories:
[Policy] Area-External
Brief description of your issue
I'm using PowerShell v7.4.2 with Windows Terminal v1.20.11271.0 and winget.exe v1.7.11261. My laptop was not connected to the internet. When I opened the terminal, since PowerShell was my default profile, it opened but couldn't open the console. An exception was thrown on the console.
After connecting to the internet, it worked fine.
Steps to reproduce
Expected behavior
Expected the PowerShell console to open without any issues
Actual behavior
Console didn't open due to an exception raised
Environment