From a026fb361d1dc9512ea2ead7f228a0de6e08e6a1 Mon Sep 17 00:00:00 2001 From: Justin Paul Date: Fri, 8 May 2026 13:41:01 -0400 Subject: [PATCH] Replace whoami subprocess with .NET API in diag whoami.exe isn't on PATH for pwsh under the gitea-runner SYSTEM context (or pwsh's strict mode treats the lookup as fatal), so the previous diagnostic line aborted the script before any of the cwd / ISCC-dir output was printed. Use WindowsIdentity.GetCurrent().Name which is in-process and always works. --- scripts/build-installer.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-installer.ps1 b/scripts/build-installer.ps1 index f0717e4..ec50ff3 100644 --- a/scripts/build-installer.ps1 +++ b/scripts/build-installer.ps1 @@ -119,7 +119,7 @@ foreach ($ref in $issRefs) { Write-Host "" Write-Host "--- runtime context ---" -ForegroundColor Cyan -Write-Host " whoami: $(whoami)" +Write-Host " identity: $([Security.Principal.WindowsIdentity]::GetCurrent().Name)" Write-Host " USERPROFILE: $env:USERPROFILE" Write-Host " APPDATA: $env:APPDATA" Write-Host " LOCALAPPDATA: $env:LOCALAPPDATA" -- 2.52.0