Skip to content

The agent that grows with you

fix(install.ps1): record 'skipped-long-path' when ConvertTo-LongPath short-circuits

Teknium2e75862790f4
diff --git a/scripts/install.ps1 b/scripts/install.ps1
index 763aee2995a..f3f5c9756ae 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).