Windows: Composer installer checksum fails because installer is written in text mode
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
hooks/post_install.lua の215~220行あたりを読み、SHA-384 検証の前に Composer インストーラーがどのように保存されるかを確認してください。Issue では、インストーラーのバイト列を保持する既存の方法として util.write_binary_file が挙げられています。チェックサムが通り、検証を有効にしたまま Windows に Composer がインストールされれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
Installing PHP on Windows through mise fails during Composer installation. The PHP archive downloads and extracts successfully, but verification of the Composer installer fails.
Environment
- Windows x64, PowerShell
- mise
2026.11.15 windows-x64 (2026-11-29) - Plugin commit:
aa2922170710cfe4d7277cca4324cf1d38b4efc8 - Requested PHP version:
8.6.0
Steps to reproduce
With the unmodified plugin at the commit above, run:
mise use vfox:version-fox/[email protected]
Actual behavior
Installation aborts with:
The Composer installer does not match the sha384 that Composer publishes;
Composer was not installed.
Expected behavior
The downloaded installer should retain its original bytes, pass SHA-384 verification and install Composer.
Cause and proposed fix
In hooks/post_install.lua, the installer is saved using util.write_file, which opens the file in text mode. On Windows, this converts LF line endings to CRLF and changes the checksum.
The plugin already provides util.write_binary_file, which preserves the downloaded bytes.
- _, err = util.write_file(setup, installer)
+ _, err = util.write_binary_file(setup, installer)
Validation
After applying only this change locally and retrying:
- Composer’s existing SHA-384 verification passed.
- PHP installation completed.
mise exec -- php -vreported PHP8.6.0.mise exec -- composer --versionreported Composer2.11.3.
Checksum verification remained enabled.
- 主要言語
- Lua
- スター
- 21
- フォーク
- 12
- 平均マージ
- 3時間 16分
- マージ済み PR(30日)
- 10
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
似ている issue
-
easy first-contributor first-contributors good first issue help wanted lua up-for-grabs
難易度 1/5 1〜3時間 初心者へのやさしさ 94/100
fork-commit-merge/fork-commit-merge#8750 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
NaixGames/Polycosmos#81 ·
-
cwc.kbd.xkb_layout/xkb_options changes are not applied to all keyboard groups after reload/runtimeオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
blood of heroesオープンbug discord triage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
stevearc/aerial.nvim#536 ·