microsoft / microsoft/winget-pkgs
`ElevationRequirement: elevationProhibited` appears to not be respected unless it's at the root level.
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 11.1k
- Forks
- 9.7k
- Avg merge
- 1h 32m
- Merged PRs (30d)
- 376
Description
Brief description of your issue
- Noticed by @aisgbnok in https://github.com/microsoft/winget-pkgs/pull/155308:
Why does 910cce4 pass validation (comment), but 84484dc fail validation (comment)? The only difference being
ElevationRequirement: elevationProhibitedin the YAML root (pass) vs individual installer nodes (fail)?
-
This is unexpected, because the 1.6.0 schema documentation has
ElevationRequirementnested underInstallers. -
Also impacted https://github.com/microsoft/winget-pkgs/pull/154823
Steps to reproduce
- Have a manifest for a package which requires
ElevationRequirement: elevationProhibited. - Move that node from the root level to under the
Installerslevel.
Expected behavior
The package manager would install the pacakge in a non-elevated way.
Actual behavior
The package manager attempts an elevated install, which fails.
Environment
https://github.com/microsoft/winget-pkgs/pull/154823#issuecomment-2130019800
Windows Package Manager v1.7.11261
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.19044.1288
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.11261.0
Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User) %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root C:\Program Files\WinGet\Packages
Portable Package Root (x86) C:\Program Files (x86)\WinGet\Packages
Installer Downloads %USERPROFILE%\Downloads
Links
---------------------------------------------------------------------------
Privacy Statement https://aka.ms/winget-privacy
License Agreement https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale
Admin Setting State
--------------------------------------------------
LocalManifestFiles Enabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride Disabled
LocalArchiveMalwareScanOverride Enabled
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 comparing the root-level and installer-level ElevationRequirement examples in the linked pull requests and the schema documentation at doc/manifest/schema/1.6.0/installer.md. Confirm whether validation or Windows Package Manager behavior is responsible; done means the documented nested form validates and installs without elevation, or the schema and manifests clearly document the supported placement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- yaml
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100