Skip to content

fix: suppress PowerShell stderr noise from uv tool install#99

Merged
jrob5756 merged 1 commit intomainfrom
fix/powershell-install-stderr
Apr 20, 2026
Merged

fix: suppress PowerShell stderr noise from uv tool install#99
jrob5756 merged 1 commit intomainfrom
fix/powershell-install-stderr

Conversation

@jrob5756
Copy link
Copy Markdown
Collaborator

Problem

When installing conductor on Windows via irm https://aka.ms/conductor/install.ps1 | iex, users see scary red error text even though the install succeeds:

uv : Resolved 53 packages in 71ms
    + CategoryInfo          : NotSpecified: (Resolved 53 packages in 71ms:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

Cause

The script sets $ErrorActionPreference = 'Stop'. PowerShell converts any native command stderr output into ErrorRecord objects, and with Stop mode, these surface as NativeCommandError exceptions. uv writes progress info (like "Resolved 53 packages") to stderr, triggering this.

Fix

Wrap the uv tool install call in try/catch and capture stderr with 2>&1. The $LASTEXITCODE check still correctly determines success/failure.

PowerShell with $ErrorActionPreference='Stop' treats any native
command stderr output as a NativeCommandError. uv writes progress
info (e.g. "Resolved 53 packages") to stderr, causing scary red
error text even when install succeeds. Wrap the call in try/catch
and rely on $LASTEXITCODE instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jrob5756 jrob5756 merged commit 873c72b into main Apr 20, 2026
6 checks passed
@jrob5756 jrob5756 deleted the fix/powershell-install-stderr branch April 20, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant