-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Brief description of your issue
Using winget autocomplete in PowerShell (see https://github.com/microsoft/winget-cli/blob/master/doc/Completion.md) can cause a hang/freeze or at worst run extremely slowly. After some investigation, it's the winget complete feature itself that hangs.
Specifically, here's a command line that freezes/hangs every time:
winget complete --word="Micro" --commandline="winget upgrade Micro" --position=2
I've verified this on both the 7.x PowerShell, legacy PowerShell (all with --noprofile) and even CMD.EXE for grins.
Position doesn't seem to matter (it's not clear in the docs if position is 0 or 1 index based, I assumed 0, but it didn't matter here what value I used for position).
The value in --word and the the parameter to winget upgrade must match.
I have noticed that sometimes it does eventually respond, but this can upwards of a minute depending on the search criteria.
Winget version is 1.11.400.
Steps to reproduce
Execute the following command line:
winnget complete --word="Micro" --commandline="winget upgrade Micro" --position=2
Expected behavior
Expected a list of apps that start with "Micro" to appear quickly.
Actual behavior
The command either hangs or freezes or takes upwards of a minute to respond.
Environment
❯ winget --info
Windows Package Manager v1.11.400
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22631.5624
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.26.400.0