Repository navigation
Scoped portable blocker (1.30) - #6678
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The scope check can reject an elevated machine-scope portable upgrade after removing the old version, and an existing portable upgrade test remains dependent on the real token state.
2 open issues
What changed in this PR
Applies a scoped version of #6634’s elevation restrictions to WinGet 1.30, blocking elevated portable installs and upgrades outside machine scope.
Changes:
- Centralizes portable install scope resolution and checks it before initialization and execution.
- Adds scope/elevation tests and token overrides for existing portable workflow tests.
- Updates workflow input comments to reflect the required context.
| File | Description |
|---|---|
| src/AppInstallerCLITests/UpdateFlow.cpp | Adds token overrides to portable upgrade tests. |
| src/AppInstallerCLITests/InstallFlow.cpp | Tests scope/elevation restrictions and early rejection. |
| src/AppInstallerCLICore/Workflows/PortableFlow.h | Corrects workflow input comments. |
| src/AppInstallerCLICore/Workflows/PortableFlow.cpp | Resolves portable scope centrally and enforces elevation restrictions. |
Review effort: Balanced
Comment on lines
+159
to
+161
| Manifest::ScopeEnum scope = GetScopeForPortableInstall(context); | ||
| EnsureSupportForPortableInstallScope(context, scope); | ||
| AICLI_RETURN_IF_TERMINATED(context); |
Member
Author
There was a problem hiding this comment.
That is an existing bug. I will fix it in the main branch next.
AmirMS (AmelBawa-msft)
approved these changes
Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


📖 Description
Apply a scoped blocker similar to #6634 to 1.30
🔍 Validation
Unit test updates and additions.
Microsoft Reviewers: Open in CodeFlow