From 2e75862790f4cb49d3fc5b64b7bebb19ab4fb09b Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Sun, 23 Aug 2026 17:50:07 -0700 Subject: [PATCH] fix(install.ps1): record 'skipped-long-path' when ConvertTo-LongPath short-circuits The ordinary-long-path early return now records why no resolver ran, so the ResolvedPathReport stays truthful instead of silently inheriting a stale value from an earlier call in the same session. Diagnostics hunk taken from PR #93100. Co-authored-by: aniruddhaadak80 --- scripts/install.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 763aee2995..f3f5c9756a 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -248,7 +248,10 @@ function ConvertTo-LongPath { if ([string]::IsNullOrWhiteSpace($Path)) { return $Path } # Only 8.3 short names carry a tilde+digit ("~1"); skip every resolver for # ordinary long paths, which is the overwhelmingly common case. - if ($Path -notmatch '~\d') { return $Path } + if ($Path -notmatch '~\d') { + $script:LastResolver = 'skipped-long-path' + return $Path + } # 1. kernel32. Compiled on first use only, so a normal profile never pays # the Add-Type cost (this file is re-entered once per install stage).