tailchrome icon indicating copy to clipboard operation
tailchrome copied to clipboard

install.ps1 aborts on Windows PowerShell 5.1 when gh is installed but not logged in

Open lucastanzani opened this issue 1 month ago • 0 comments

Version: v0.1.15, tailchrome-install.ps1 (sha256 70f3455f...1cbc) Environment: Windows 11 25H2, Windows PowerShell 5.1, standard (non-admin) user, GitHub CLI on PATH but not logged in for that user.

What happens

The attestation check runs & $gh.Source auth status --hostname github.com *> $null (scripts/install.ps1:178). gh writes "You are not logged into any GitHub hosts" to stderr. Under Windows PowerShell 5.1 with $ErrorActionPreference = 'Stop' (line 14), redirected native stderr becomes a terminating NativeCommandError, so the script stops before it reaches the $LASTEXITCODE check and the intended warning. PowerShell 7 is not affected.

Repro

As a standard user with gh installed and not logged in:

powershell -NoProfile -ExecutionPolicy Bypass -File tailchrome-install.ps1 -Version v0.1.15 -AllowUnsigned

Result: NativeCommandError at line 178, exit code 1, nothing installed. With gh removed from PATH the same command installs and registers the helper.

Suggested fix

Run the three gh probes with a local $ErrorActionPreference = 'Continue' (for example inside a small helper function) and keep relying on $LASTEXITCODE.

Related, smaller

The PowerShell command shown in the popup (packages/shared/src/popup/views/install-helpers.ts:181-187) does not pass -AllowUnsigned. While Windows releases are unsigned, that command stops at "Release is unsigned" and the user gets no hint about how to continue.

lucastanzani avatar Oct 21 '26 14:10 lucastanzani