Skip to content

Windows mise support - #683

Open
dealenx wants to merge 3 commits into
railwayapp:mainfrom
dealenx:windows-mise-fix
Open

Windows mise support#683
dealenx wants to merge 3 commits into
railwayapp:mainfrom
dealenx:windows-mise-fix

Conversation

@dealenx

@dealenx dealenx commented Aug 8, 2026

Copy link
Copy Markdown

Motivation

Context - #404

Support mise for Windows 11 OS

Problem before

PS C:\Users\dealenx\dev\my-app> mise -V
              _                                        __
   ____ ___  (_)_______        ___  ____        ____  / /___ _________
  / __ `__ \/ / ___/ _ \______/ _ \/ __ \______/ __ \/ / __ `/ ___/ _ \
 / / / / / / (__  )  __/_____/  __/ / / /_____/ /_/ / / /_/ / /__/  __/
/_/ /_/ /_/_/____/\___/      \___/_/ /_/     / .___/_/\__,_/\___/\___/
                                            /_/                 by @jdx
2026.7.11 windows-x64 (2026-07-20)
mise WARN  mise version 2026.8.1 available
mise WARN  To update, run mise self-update
PS C:\Users\dealenx\dev\my-app> railpack build .

╭─────────────────╮
│ Railpack 0.35.0 │
╰─────────────────╯

  ✖ Failed to ensure mise is installed: failed to download and install: failed to extract archive: binary not found in archive

Demo

image

The releases to test: https://github.com/dealenx/railpack/releases/tag/v0.35.1

dealenx added 3 commits August 9, 2026 01:26
The Windows mise release archive contains mise/bin/mise.exe (unversioned), but the extractor matched against the versioned output filename returned by getBinaryName(). Match both the versioned output name and the plain archive name on Windows so extraction succeeds.
filepath.Dir/Join/IsAbs/Base are host-OS dependent and convert forward slashes to backslashes on Windows, corrupting Linux container paths (e.g. /etc/mise/config.toml became \etc\mise). Use forward-slash logic in convertFileCommandToLLB and the path package in resolvePaths so generated container paths stay POSIX regardless of the host OS.

@iloveitaly iloveitaly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the contribution. I'd love to get this in. I think there's a couple of improvements you can make to reduce the code complexity here, but otherwise, this looks good.

I want to add some basic integration tests for Windows on GitHub Actions as well, but that's a bit separate from this pull request.

// Create parent directories for the file
parentDir := filepath.Dir(cmd.Path)
// Create parent directories for the file. The container always runs Linux, so
// container paths must stay POSIX-style. filepath.Dir is host-OS dependent and

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is there a reason parentDir := path.Dir(cmd.Path) wouldn't work?

Comment thread core/mise/install.go
// the versioned output name or the plain archive name so both layouts are handled.
var archiveNames []string
if runtime.GOOS == "windows" {
archiveNames = []string{getBinaryName(), "mise.exe"}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why do we need an array here? we should be able to leave this alone and just update the binary name.

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