Skip to content

fix: install mise-shim.exe on Windows#476

Merged
jdx merged 2 commits into
jdx:mainfrom
risu729:risu/fix-windows-mise-shim
May 14, 2026
Merged

fix: install mise-shim.exe on Windows#476
jdx merged 2 commits into
jdx:mainfrom
risu729:risu/fix-windows-mise-shim

Conversation

@risu729

@risu729 risu729 commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • install mise-shim.exe beside mise.exe when extracting Windows mise release zips
  • repair restored Windows caches that have mise.exe but are missing mise-shim.exe
  • add a Windows CI assertion for the installed shim binary

Fixes #475.

Testing

  • npm run all
  • actionlint

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for mise-shim.exe on Windows by adding logic to download and install it from release archives if missing. It refactors version detection and improves temporary file management during the extraction process. Feedback suggests optimizing performance by avoiding redundant version checks and refactoring duplicated download and extraction logic into a shared utility function to improve maintainability.

Comment thread src/index.ts Outdated
Comment thread src/index.ts Outdated
@greptile-apps

greptile-apps Bot commented May 14, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes Windows mise installations by extracting mise-shim.exe alongside mise.exe from the Windows release zip, and adds a repair path that re-downloads the matching archive for cached installs where the shim is missing.

  • Fresh installs on Windows now extract both mise.exe and mise-shim.exe from the zip using the new withExtractedZip/installWindowsMiseShim helpers, replacing the previous single-file extraction.
  • A new ensureWindowsMiseShim function handles the cache-hit repair case: if mise-shim.exe is absent after restoring a cached mise.exe, it downloads the matching release archive and extracts the shim.
  • A Windows-only CI assertion verifies that mise-shim.exe is co-located with mise.exe after the action runs.

Confidence Score: 5/5

Safe to merge — the change is narrowly scoped to Windows shim installation and does not touch any non-Windows code paths.

The new helpers correctly handle all three Windows scenarios: fresh install (shim extracted from the same zip), cached install needing repair (version resolved from the binary when not provided), and already-complete installs (early exit). Non-Windows paths are unaffected by the early-return guards in every new function.

No files require special attention.

Important Files Changed

Filename Overview
src/index.ts Adds withExtractedZip, installWindowsMiseShim, ensureWindowsMiseShim, getInstalledMiseVersion, and errorMessage helpers; correctly handles fresh installs, cached installs, and the undefined-version fallback path on Windows.
.github/workflows/test.yml Adds a Windows-only PowerShell step that asserts mise-shim.exe is co-located with mise.exe; logic is correct.
dist/index.js Generated bundle from src/index.ts; no direct review needed.

Reviews (2): Last reviewed commit: "refactor: share Windows zip extraction" | Re-trigger Greptile

Comment thread src/index.ts Outdated
@risu729 risu729 marked this pull request as ready for review May 14, 2026 16:49
@risu729 risu729 requested a review from jdx as a code owner May 14, 2026 16:49
@jdx jdx merged commit 93ca8a4 into jdx:main May 14, 2026
18 checks passed
@jdx jdx mentioned this pull request May 14, 2026
@risu729 risu729 deleted the risu/fix-windows-mise-shim branch May 14, 2026 19:39
@jdx jdx mentioned this pull request May 22, 2026
@jdx jdx mentioned this pull request Jun 4, 2026
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.

mise-shim.exe does not get installed on Windows

2 participants