Skip to content

fix: auto_install を false に変更して mise shim エラーを修正#410

Merged
tak848 merged 6 commits intomainfrom
fix/disable-auto-install
Feb 16, 2026
Merged

fix: auto_install を false に変更して mise shim エラーを修正#410
tak848 merged 6 commits intomainfrom
fix/disable-auto-install

Conversation

@tak848
Copy link
Owner

@tak848 tak848 commented Feb 16, 2026

問題

Ghostty / VSCode で dotfiles ディレクトリを開くと以下のエラーが発生:

mise ERROR no tasks defined in ~/repos/github.com/tak848/dotfiles. Are you in a project directory?
error: unexpected argument '--zsh' found
error: unexpected argument '--completion' found

根本原因

1. 残骸 shim

PR #322 (89aa3f1, Jan 5) で zoxide を mise → aqua CLI に移行した際、
~/.local/share/mise/shims/zoxide~/.local/share/mise/installs/aqua-ajeetdsouza-zoxide/0.9.8/ が残った。
mise reshim は「インストール済みの全ツール」から shim を生成するため、インストールディレクトリが残っている限り shim が再生成され続けていた。

mise uninstall aqua:ajeetdsouza/zoxide@0.9.8 で別途解消済み

2. mise v2026.2.10 の "Shims as PATH fallback" 変更

PR jdx/mise#8106 により、auto_installnot_found_auto_install)有効時、
mise activate zsh が shims ディレクトリを PATH から除去しなくなった。

この変更の意図:

  • サブシェルで未インストールツールの auto-install が発動しない問題の修正
  • mise 未インストールでもシステムの同名コマンドが誤って使われる問題の修正

v2026.2.9 以前: mise activate zsh.zprofilemise activate zsh --shims で追加された shims を PATH から明示的に除去していた
v2026.2.10 以降: shims が PATH にフォールバックとして残る

diff <(mise-2026.2.9 activate zsh) <(mise-2026.2.11 activate zsh) で確認:
v2026.2.9 にあった shims 除去の export PATH=... 行が v2026.2.11 で削除されている。

エラー発生の流れ

.zprofile: mise activate zsh --shims → PATH に shims を追加
.zshrc:    mise activate zsh
  v2026.2.9以前 → shims を PATH から除去 → zoxide は aqua バイナリに解決 ✅
  v2026.2.10以降 → shims が PATH に残る → 残骸 shim が aqua より先にヒット ❌

.zshrc:    eval "$(zoxide init zsh)"
  → ~/.local/share/mise/shims/zoxide(残骸 shim)が実行される
  → shim → bootstrap → exec mise init zsh
  → "init" はサブコマンドでなく experimental=true でタスク名として解釈
  → "no tasks defined" エラー

shims フォールバックの設計上の問題

mise reshim は config で active でないインストール済みツール全ての shim も生成する。
v2026.2.10 以降、activate 時に shims が PATH フォールバックとして残る仕様になったため、
mise 管理から別ツール管理に移行したツールで古い shim が本物のバイナリより先にヒットし得る。

修正

.mise.tomlauto_installtruefalse に変更。

  • auto_install = false にすることで shims フォールバックが無効化され、従来の shims 除去挙動に戻る
  • グローバル config (~/.config/mise/config.toml) も auto_install = false であり、プロジェクト config のみ true だった

検証

MISE_AUTO_INSTALL=false mise activate zsh の出力で shims 除去行の復活を確認済み。
zsh -l -i -c 'exit' 2>&1 → mise エラーなし

関連リンク

tak848 and others added 6 commits February 16, 2026 11:29
- github:tmux/tmux-builds v3.6a を dot_config/mise/config.toml に追加
- mise:lock タスクで gh auth token から MISE_GITHUB_TOKEN を設定し rate limit を回避
- lazy-lock.yaml: scheduled ジョブで GITHUB_TOKEN → App Token に変更し CI をトリガー可能に
- AGENTS.md: task generate (No-op) や dot_claude/*.json 等の古い記述を修正
- .github/workflows/README.md: 全ワークフローの説明を実態に合わせて書き直し
- ci.yaml の push トリガーに lazy-lock-update ブランチを追加
- GITHUB_TOKEN で作成された PR は pull_request イベントをトリガーしないため
- lazy-lock.yaml の変更を revert
mise v2026.2.10 (PR #8106) で auto_install 有効時に shims が PATH の
フォールバックとして残る仕様変更が入り、残骸 shim が aqua 管理の
バイナリより先にヒットしてエラーが発生していた。

chezmoi の run_onchange スクリプトで明示的に mise install するため
auto_install は不要。false にすることで従来の shims 除去挙動に戻す。
Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

Open in Devin Review

Comment on lines 45 to 49
[[tools."aqua:cloudflare/cloudflared"]]
version = "2026.2.0"
backend = "aqua:cloudflare/cloudflared"
"platforms.linux-arm64" = { checksum = "sha256:03c5d58e283f521d752dc4436014eb341092edf076eb1095953ab82debe54a8e", url = "https://github.com/cloudflare/cloudflared/releases/download/2026.2.0/cloudflared-linux-arm64"}
"platforms.linux-x64" = { checksum = "sha256:176746db3be7dc7bd48f3dd287c8930a4645ebb6e6700f883fddda5a4c307c16", url = "https://github.com/cloudflare/cloudflared/releases/download/2026.2.0/cloudflared-linux-amd64"}
"platforms.macos-arm64" = { checksum = "sha256:685688a260c324eb8d9c9434ca22f0ce4f504fd6acd0706787c4833de8d6eb17", url = "https://github.com/cloudflare/cloudflared/releases/download/2026.2.0/cloudflared-darwin-amd64.tgz"}
"platforms.macos-x64" = { checksum = "sha256:685688a260c324eb8d9c9434ca22f0ce4f504fd6acd0706787c4833de8d6eb17", url = "https://github.com/cloudflare/cloudflared/releases/download/2026.2.0/cloudflared-darwin-amd64.tgz"}

Choose a reason for hiding this comment

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

🚩 cloudflared の linux/windows プラットフォームエントリがロックファイルから削除されている

このPRのブランチに含まれる dot_config/mise/mise.lock の差分で、aqua:cloudflare/cloudflared のエントリから platforms.linux-arm64platforms.linux-x64platforms.windows-x64 が削除されています(dot_config/mise/mise.lock:45-49)。

Taskfile では MISE_PLATFORMS: linux-x64,linux-arm64,macos-x64,macos-arm64,windows-x64 を指定して全プラットフォーム分を生成する設計になっていますが(Taskfile.yaml:38)、このロックファイルは task mise:lock ではなく直接 mise lock が実行された可能性があります。

CLAUDE.md に「mise.lock は実行環境によって結果が異なる既知の問題」「mise.lock の更新は Renovate ワークフローに任せる」と記載があり、CI の diff チェックからも除外されているため、実運用上は Renovate が正しいエントリで上書きします。ただし、Linux 環境で locked = true 相当の厳密な検証を行う場合、該当エントリが欠落していると問題になる可能性があります(現状 locked = false のため影響なし)。

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines 48 to 49
"platforms.macos-arm64" = { checksum = "sha256:685688a260c324eb8d9c9434ca22f0ce4f504fd6acd0706787c4833de8d6eb17", url = "https://github.com/cloudflare/cloudflared/releases/download/2026.2.0/cloudflared-darwin-amd64.tgz"}
"platforms.macos-x64" = { checksum = "sha256:685688a260c324eb8d9c9434ca22f0ce4f504fd6acd0706787c4833de8d6eb17", url = "https://github.com/cloudflare/cloudflared/releases/download/2026.2.0/cloudflared-darwin-amd64.tgz"}

Choose a reason for hiding this comment

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

📝 Info: cloudflared の macos-arm64 が amd64 の URL/checksum を参照している(既存の問題)

dot_config/mise/mise.lock:48platforms.macos-arm64 エントリが cloudflared-darwin-amd64.tgz を参照しており、checksum も platforms.macos-x64dot_config/mise/mise.lock:49)と完全に同一です。

"platforms.macos-arm64" = { checksum = "sha256:685688a...", url = ".../cloudflared-darwin-amd64.tgz"}
"platforms.macos-x64" = { checksum = "sha256:685688a...", url = ".../cloudflared-darwin-amd64.tgz"}

これは cloudflared が macOS 向けにユニバーサルバイナリ(amd64 名義だが arm64 も含む)を配布している可能性が高く、mise/aqua のレジストリがそのように定義しているためと思われます。PR 以前(main ブランチ)でも同じ状態だったため、このPRで導入された問題ではありません。

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4389029250

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 45 to 49
[[tools."aqua:cloudflare/cloudflared"]]
version = "2026.2.0"
backend = "aqua:cloudflare/cloudflared"
"platforms.linux-arm64" = { checksum = "sha256:03c5d58e283f521d752dc4436014eb341092edf076eb1095953ab82debe54a8e", url = "https://github.com/cloudflare/cloudflared/releases/download/2026.2.0/cloudflared-linux-arm64"}
"platforms.linux-x64" = { checksum = "sha256:176746db3be7dc7bd48f3dd287c8930a4645ebb6e6700f883fddda5a4c307c16", url = "https://github.com/cloudflare/cloudflared/releases/download/2026.2.0/cloudflared-linux-amd64"}
"platforms.macos-arm64" = { checksum = "sha256:685688a260c324eb8d9c9434ca22f0ce4f504fd6acd0706787c4833de8d6eb17", url = "https://github.com/cloudflare/cloudflared/releases/download/2026.2.0/cloudflared-darwin-amd64.tgz"}
"platforms.macos-x64" = { checksum = "sha256:685688a260c324eb8d9c9434ca22f0ce4f504fd6acd0706787c4833de8d6eb17", url = "https://github.com/cloudflare/cloudflared/releases/download/2026.2.0/cloudflared-darwin-amd64.tgz"}

Choose a reason for hiding this comment

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

P2 Badge cloudflared の非 macOS ロック URL を復元する

この変更で aqua:cloudflare/cloudflared の lockfile エントリが macOS の 2 プラットフォームだけになり、platforms.linux-*platforms.windows-x64 の URL/チェックサムが消えています。mise install --help には --locked(または MISE_LOCKED=1)時に「現在のプラットフォーム向け pre-resolved URL が lockfile に無いと失敗する」と明記されているため、Linux/Windows では mise install --lockedNo lockfile URL found で失敗しますし、通常モードでも該当 OS では URL 固定が効かず再現性が下がります。

Useful? React with 👍 / 👎.

@tak848 tak848 merged commit bbf6622 into main Feb 16, 2026
3 checks passed
@tak848 tak848 deleted the fix/disable-auto-install branch February 16, 2026 08:16
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.

1 participant