Skip to content

Surface PowerShell errors in viam update Windows PATH step#6111

Draft
allisonschiang wants to merge 1 commit into
viamrobotics:mainfrom
allisonschiang:surface-windows-path-errors
Draft

Surface PowerShell errors in viam update Windows PATH step#6111
allisonschiang wants to merge 1 commit into
viamrobotics:mainfrom
allisonschiang:surface-windows-path-errors

Conversation

@allisonschiang

Copy link
Copy Markdown
Member

addToWindowsUserPATH (the Windows PATH step of viam update) reduced any PowerShell failure to exit status 1, hiding the real cause. This surfaces PowerShell's actual output:

  • read path (GetEnvironmentVariable, .Output()): include exitErr.Stderr
  • write path (SetEnvironmentVariable): switch .Run().CombinedOutput() so there is captured output to show

Same approach as the brew error-surfacing work. The structural swallow is verified, but this is a Windows-only path — draft until validated on a Windows machine (a PATH-write failure is rare to trigger naturally).

🤖 Generated with Claude Code

addToWindowsUserPATH reduced any PowerShell failure to "exit status 1".
Surface the real error instead: the read path includes exitErr.Stderr,
and the write path switches Run() to CombinedOutput() so there is captured
output to show.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test This pull request is marked safe to test from a trusted zone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants