microsoft / microsoft/winget-cli
installation of a clashing package name requires admin privilege, and machine scoped install won't work
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
winget install nano (for the editor) tell me there are two packages having the word nano in them. then trying to install the correct package, gnu.nano, gives error telling admin privilege is required.
in such a case, installing it as admin does not install it machine scoped.
Steps to reproduce
- open user terminal and issue the command
winget install nano- this gives error/warning that multiple packages have "nano" in their names
- then try with the correct id/name:
winget install gnu.nano(or with--id gnu.nano)- strike 1 - this tells this operation needs admin priveleges
- open admin terminal and use
winget install gnu.nanoto install - open a new user terminal and try the command.
- realize the install was only for the admin since the default scope is "user"
- open admin terminal again, remove user scoped install and install with
--scope machine - open another new user terminal and try the command.
- strike 2 - user still cannot see the installed nano command.
Expected behavior
the installation should work without any admin privilege, or at least it should have worked for the user after privileged install.
Actual behavior
user could not use the package even after installed by admin
Environment
Windows Package Manager v1.3.2691
Windows: Windows.Desktop v10.0.19044.2130
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 the user and administrator flows with winget install gnu.nano and --scope machine on the stated Windows and WinGet versions. Trace the install command's elevation and scope handling, then verify that a machine-scoped install is usable from a new non-administrator terminal without requiring unnecessary elevation.
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