Replace whoami subprocess with .NET API in diag #15

Merged
justin merged 1 commits from fix-whoami into main 2026-05-08 13:41:18 -04:00
Owner

whoami.exe is not on PATH for pwsh under the gitea-runner SYSTEM context, so the previous diagnostic aborted before any of the actual cwd/ISCC output got printed. Use [Security.Principal.WindowsIdentity]::GetCurrent().Name which is in-process.

whoami.exe is not on PATH for pwsh under the gitea-runner SYSTEM context, so the previous diagnostic aborted before any of the actual cwd/ISCC output got printed. Use [Security.Principal.WindowsIdentity]::GetCurrent().Name which is in-process.
justin added 1 commit 2026-05-08 13:41:18 -04:00
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.
justin merged commit 10b15fc17c into main 2026-05-08 13:41:18 -04:00
justin deleted branch fix-whoami 2026-05-08 13:41:50 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: justin/webhook-server#15