Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions shell/lib/github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions shell/lib/github_test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -49,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" {
Expand All @@ -61,5 +65,6 @@ teardown() {
assert mise which stencil

run "$(mise which stencil)" --version
assert_success
assert_output --regexp "(rc|unstable)"
}