Handle MSI reboot-required exit codes as success in JdkInstaller#289
Draft
Handle MSI reboot-required exit codes as success in JdkInstaller#289
Conversation
Implements JdkInstaller class for automated JDK installation: - JDK discovery via Microsoft OpenJDK release API (supports JDK 21) - Platform-aware download (Windows .zip/.msi, macOS .tar.gz/.pkg, Linux .tar.gz) - SHA-256 checksum verification with Zip Slip protection - Elevated install mode: uses native installers (.msi/.pkg) when running as admin/root - Non-elevated mode: extracts archives to user-writable paths - Atomic extraction with rollback on failure - Cancellation support throughout the pipeline - Progress reporting via IProgress<JdkInstallProgress> Models organized in Models/Jdk/ folder: - JdkVersionInfo, JdkReleaseInfo, JdkPlatformAsset - JdkInstallProgress (record type for progress reporting) Includes comprehensive tests for discovery, download, extraction, and error handling. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- IsTargetPathWritable: test nearest existing ancestor instead of creating target dir - InstallWithPlatformInstallerAsync: fetch checksum before download - IsElevatedUnix: guard geteuid P/Invoke with OperatingSystem.IsWindows() check - Add SetLastError=true to geteuid DllImport Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- GetArchitectureName: explicitly handle X64, throw for unsupported archs - IsTargetPathWritable: add directory boundary check (prevents false match on 'Program FilesX') - Modernize catch filter to use 'is not' pattern - Extract IsUnderDirectory helper Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: rmarinho <1235097+rmarinho@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix feedback on JDK installation support PR
Handle MSI reboot-required exit codes as success in JdkInstaller
Feb 25, 2026
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.
msiexecreturns non-zero codes 3010 and 1641 to indicate successful installation with a pending reboot — previously these were incorrectly treated as failures and threw an exception.Changes
JdkInstaller.RunPlatformInstaller: detect Windows MSI reboot-required exit codes before the failure check3010(success, reboot required) and1641(success, restart initiated) are treated as success on WindowsTraceLevel.Warningis logged when a reboot is neededInvalidOperationException🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.