Skip to content

Scoped portable blocker (1.30) - #6678

Merged
JohnMcPMS merged 2 commits into
microsoft:release-v1.30from
JohnMcPMS:portable-lock-30
Nov 13, 2026
Merged

JohnMcPMS merged 2 commits into
microsoft:release-v1.30from
JohnMcPMS:portable-lock-30

Conversation

@JohnMcPMS

@JohnMcPMS JohnMcPMS commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

📖 Description

Apply a scoped blocker similar to #6634 to 1.30

🔍 Validation

Unit test updates and additions.

Microsoft Reviewers: Open in CodeFlow

@JohnMcPMS
JohnMcPMS requested a review from a team as a code owner November 12, 2026 23:30
@JohnMcPMS JohnMcPMS changed the title scoped portable blocker Scoped portable blocker (1.30) Nov 12, 2026
@AmelBawa-msft
AmirMS (AmelBawa-msft) requested a balanced review from Copilot November 13, 2026 19:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is an existing bug. I will fix it in the main branch next.

@JohnMcPMS
JohnMcPMS merged commit e7637d1 into microsoft:release-v1.30 Nov 13, 2026
4 checks passed
@JohnMcPMS
JohnMcPMS deleted the portable-lock-30 branch November 13, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants