Skip to content

install-doppio.ps1: don't fail on reg.exe's success message - #2

Merged
Nobrac merged 2 commits into
mainfrom
fix-reg-import-stderr
Oct 11, 2026
Merged

Nobrac merged 2 commits into
mainfrom
fix-reg-import-stderr

Conversation

@Nobrac

@Nobrac Nobrac commented Oct 11, 2026

Copy link
Copy Markdown
Owner

install-doppio.ps1 failed in the VM right after a successful reg import:

reg.exe : The operation completed successfully.
    + FullyQualifiedErrorId : NativeCommandError

reg.exe writes its success message to stderr. In Windows PowerShell 5.1, 2>&1 turns each stderr line into an error record, and because the script runs with $ErrorActionPreference = 'Stop', it stops at that point. The import itself had worked, so only the "Next:" output after it was skipped. -EnableFilter uses the same call, so it fails the same way.

  • Both imports now go through Invoke-RegImport. It runs reg.exe with Continue and decides success by the exit code alone.
  • New CI step in Windows PowerShell 5.1: it pulls the helper out of the script and runs it against a throwaway HKCU key. A good import has to pass, and a missing file has to throw.

The parse step in CI couldn't catch this, because the script is syntactically fine. The problem only shows up at runtime in 5.1.

🤖 Generated with Claude Code

https://claude.ai/code/session_015Q8WTBzhJ9rZXAXLe89ssH


Generated by Claude Code

reg.exe writes "The operation completed successfully." to stderr. In
Windows PowerShell 5.1, `2>&1` turns that line into an error record,
and with ErrorActionPreference 'Stop' the script ended with a
NativeCommandError right after a good import (seen in the VM). Both
imports now go through Invoke-RegImport, which runs reg.exe with
'Continue' and decides by the exit code alone.

CI runs the helper in Windows PowerShell 5.1 against a throwaway HKCU
key: a good import must pass, a missing file must throw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Q8WTBzhJ9rZXAXLe89ssH
GitHub's powershell shell exits with $LASTEXITCODE, and the last reg.exe
call in the check is the one that has to fail. Report through
annotations so a failure says what went wrong.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Q8WTBzhJ9rZXAXLe89ssH
@Nobrac
Nobrac merged commit dec5fd2 into main Oct 11, 2026
4 checks passed
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.

2 participants