fix: install.ps1 git-identity prompt only on real TTYs (parity with install.sh) #21

Merged
jsutter merged 1 commit from fix/installer-ps51-git-prompt into main 2026-09-12 01:25:45 +00:00
Owner

Found live on the win11-test golden (PS 5.1.26100.9168) during the S011 verification run, once the vendored-minisign gate (PR #20) let the installer get past its hash pin for the first time:

  • pinned install completed: minisign downloaded + hash-pinned + release signature verified, ditc v3.1.2 installed, config written
  • then the installer exited 1 in its git-identity block: $Host.UI.RawUI is non-null and $Host.Name is ConsoleHost under any console host, and no CI env vars are set in an ssh-exec session — so the interactive Read-Host branch was taken and died at EOF

The Unix installer already gates the same prompt on [ -t 0 ] && [ -t 1 ]; the PS side now uses the direct equivalent, -not [Console]::IsInputRedirected -and -not [Console]::IsOutputRedirected. Real console users keep the prompt; agent-driven installs (the product's own 40-deploy pattern) take the existing auto-detect branch.

Tests: sh tests/install-signing.sh and pwsh tests/install-ps1-signing.ps1 (MINISIGN_EXE set) — ALL CHECKS PASSED; file stays pure ASCII (PS 5.1 codepage rule, PR #19). End-to-end proof lands with the ditc-v3.1.3 release + S011 windows-stage re-run.

Found live on the win11-test golden (PS 5.1.26100.9168) during the S011 verification run, once the vendored-minisign gate (PR #20) let the installer get past its hash pin for the first time: - pinned install completed: minisign downloaded + hash-pinned + **release signature verified**, `ditc v3.1.2 installed`, config written - then the installer exited 1 in its git-identity block: `$Host.UI.RawUI` is non-null and `$Host.Name` is ConsoleHost under any console host, and no CI env vars are set in an ssh-exec session — so the interactive `Read-Host` branch was taken and died at EOF The Unix installer already gates the same prompt on `[ -t 0 ] && [ -t 1 ]`; the PS side now uses the direct equivalent, `-not [Console]::IsInputRedirected -and -not [Console]::IsOutputRedirected`. Real console users keep the prompt; agent-driven installs (the product's own 40-deploy pattern) take the existing auto-detect branch. Tests: `sh tests/install-signing.sh` and `pwsh tests/install-ps1-signing.ps1` (MINISIGN_EXE set) — ALL CHECKS PASSED; file stays pure ASCII (PS 5.1 codepage rule, PR #19). End-to-end proof lands with the ditc-v3.1.3 release + S011 windows-stage re-run.
The RawUI/CI-var heuristic classified ssh-exec and piped sessions as
interactive (no CI env vars set there), so agent-driven installs and the
invite-e2e windows golden died in Read-Host at EOF right after the
minisign gate passed (first reachable once S011 unblocked the gate).
[Console]::IsInputRedirected/-IsOutputRedirected is the PS equivalent of
install.sh's [ -t 0 ] && [ -t 1 ]: real console users still get the
prompt; everyone else takes the auto-detect branch that already existed.

Found live on win11-test (PS 5.1.26100.9168): install completed to
'ditc v3.1.2 installed' + config write, then exited 1 silently inside
the prompt branch.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
deepnet/dit-releases!21
No description provided.