Repository navigation
install-doppio.ps1: don't fail on reg.exe's success message - #2
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
install-doppio.ps1failed in the VM right after a successfulreg import:reg.exewrites its success message to stderr. In Windows PowerShell 5.1,2>&1turns 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.-EnableFilteruses the same call, so it fails the same way.Invoke-RegImport. It runsreg.exewithContinueand decides success by the exit code alone.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