From b60a229b2d7e5b95e14a0c564a0226de46202f75 Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Thu, 9 Jul 2026 19:47:36 -0700 Subject: [PATCH 1/2] test(github): declare wait-for-gh-rate-limit in mise test config The isolated mise global config used by these tests did not declare wait-for-gh-rate-limit, so run_mise emitted "No version is set for shim: wait-for-gh-rate-limit" while installing the test tool. Declare it (pinned to match mise.devbase.toml) to keep the test output clean. Assisted-By: Claude Opus 4.8 via opencode --- shell/lib/github_test.bats | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/shell/lib/github_test.bats b/shell/lib/github_test.bats index dff6c25ce..4f8ab47ff 100644 --- a/shell/lib/github_test.bats +++ b/shell/lib/github_test.bats @@ -18,8 +18,11 @@ setup() { export MISE_GLOBAL_CONFIG_ROOT="$MISE_CONFIG_DIR" export MISE_GLOBAL_CONFIG_FILE="$MISE_CONFIG_DIR/global.toml" export MISE_OVERRIDE_CONFIG_FILENAMES="global.toml" - echo '[tools]' >>"$MISE_GLOBAL_CONFIG_FILE" - echo 'github-cli = "latest"' >>"$MISE_GLOBAL_CONFIG_FILE" + { + echo '[tools]' + echo 'github-cli = "latest"' + echo 'wait-for-gh-rate-limit = "1.1.1"' + } >>"$MISE_GLOBAL_CONFIG_FILE" } teardown() { From 5b48b2fdfcf01038829adb24630d06ca043f93bd Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Thu, 9 Jul 2026 20:06:20 -0700 Subject: [PATCH 2/2] fix(github): strip leading v from semver tags before mise install mise 2026.6.14+ normalizes the leading `v` away when installing a pre-release GitHub tag (e.g. v1.2.3-rc.1 becomes 1.2.3-rc.1) but re-adds it during `mise which`/`mise where` resolution, so the freshly-installed tool resolves as not installed/inactive. This broke install_latest_github_release for pre-release tags (observed as the test-macos failure installing stencil) and affects any v-prefixed pre-release GitHub tool resolved through mise_exec_tool. Strip the leading `v` before handing the version to mise, only before a digit so non-semver tags are untouched. The stencil install tests also assert the binary runs. Assisted-By: Claude Opus 4.8 via opencode --- shell/lib/github.sh | 7 +++++++ shell/lib/github_test.bats | 2 ++ 2 files changed, 9 insertions(+) diff --git a/shell/lib/github.sh b/shell/lib/github.sh index 5516d4aa6..e98bfb11e 100644 --- a/shell/lib/github.sh +++ b/shell/lib/github.sh @@ -85,6 +85,13 @@ install_latest_github_release() { info "Using $slug:${binary_name} version: ($tag)" + # Strip a leading `v` (before a digit) so mise receives a normalized version. + # mise 2026.6.14+ drops the `v` when installing a pre-release tag but re-adds + # it during `mise which`/`mise where`, so the tool resolves as not installed. + if [[ $tag =~ ^v[0-9] ]]; then + tag="${tag#v}" + fi + # Need to export GITHUB_TOKEN so that future calls to `mise` # continue to use it for the configured private repos. if [[ -z ${GITHUB_TOKEN:-} ]]; then diff --git a/shell/lib/github_test.bats b/shell/lib/github_test.bats index 4f8ab47ff..50bf27c1f 100644 --- a/shell/lib/github_test.bats +++ b/shell/lib/github_test.bats @@ -52,6 +52,7 @@ teardown() { assert mise which stencil run "$(mise which stencil)" --version + assert_success } @test "install_latest_github_release should be able to download and install the latest pre-release of a repo" { @@ -64,5 +65,6 @@ teardown() { assert mise which stencil run "$(mise which stencil)" --version + assert_success assert_output --regexp "(rc|unstable)" }