fix(tool-stubs): platform-specific bin fields by jdx · Pull Request #5812 · jdx/mise (original) (raw)

added 2 commits

July 27, 2025 16:44

@jdx

Fixes issue where tool-stub generation failed with .tar.gz URLs due to:

@jdx

The previous logic was too simplistic and could select the wrong binary. For example, with Node.js it was selecting yarnpkg.js instead of the main node binary.

The new algorithm prioritizes binaries based on:

  1. Exact filename match with tool name (highest priority)
  2. Filename starts with tool name
  3. Shorter path depth (prefer bin/tool over lib/deeply/nested/tool)
  4. Prefer bin/ directory
  5. Avoid test/spec/example binaries
  6. Prefer executables without extensions or standard extensions

This ensures tool stubs generate with the correct primary binary path.

@jdx jdx marked this pull request as ready for review

July 27, 2025 22:11

Copilot AI review requested due to automatic review settings

July 27, 2025 22:11

@jdx

@autofix-ci

@autofix-ci

@jdx

@jdx

This enables explicit control over platform-specific binary paths when tools have different binary structures across platforms (e.g., .exe on Windows).

Usage examples:

[cursor[bot]](/apps/cursor)

@autofix-ci

@jdx

@autofix-ci

[cursor[bot]](/apps/cursor)

@jdx

@jdx jdxenabled auto-merge (squash)

July 28, 2025 00:04

@jdx jdx deleted the platform-bin-paths branch

July 28, 2025 00:12

jdx pushed a commit that referenced this pull request

Jul 28, 2025

@mise-en-dev

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

[ Show hidden characters]({{ revealButtonHref }})