microsoft / microsoft/winget-cli
package search in winget does not work the first time you run it
Open
Nobody has claimed this yet.
Issue-Bug
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
The package search in winget does not work the first time you run it. On the second attempt, it works.
Steps to reproduce
winget search Microsoft.PowerShell
Expected behavior
winget finds 2 packages (second try)
C:\Users\pedri>winget search Microsoft.PowerShell
Name Id Version Source
---------------------------------------------------------------
PowerShell Microsoft.PowerShell 7.2.7.0 winget
PowerShell Preview Microsoft.PowerShell.Preview 7.3.8.0 winget
Actual behavior
winget finds 0 packages (first try)
C:\Users\pedri>winget search Microsoft.PowerShell
Failed in attempting to update the source: winget
The `msstore` source requires that you view the following agreements before using.
Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction
The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US").
Do you agree to all the source agreements terms?
[Y] Yes [N] No: y
Failed when searching source; results will not be included: winget
No package found matching input criteria.
Environment
Windows Package Manager v1.3.2691
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22623.875
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.18.2691.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing winget search Microsoft.PowerShell on the stated Windows Package Manager version and trace the first-run source update and agreement flow. Done means the first command returns the expected packages without incorrectly reporting zero results; no source file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100