feat(github): keep exe extensions on Windows#8424
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses an issue on Windows where executable file extensions like Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Greptile SummaryThis PR fixes a Windows-specific bug where renaming executables (via Key Changes:
Implementation Notes: Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 2e96723 |
|
The let exts = keep_exts.map(|s| s.to_vec()).unwrap_or_else(|| {
vec![".exe".to_string(), ".cmd".to_string(), ".bat".to_string()]
});So the configurable option adds no value — there's no reason a registry entry would ever need to customize this list. The entire fix could just be the
The core bug fix (preserving This comment was generated by Claude Code. |
There was a problem hiding this comment.
Code Review
This pull request introduces a feature to preserve executable file extensions on Windows, which is a valuable fix for tools like yt-dlp. The implementation is mostly solid, adding a new configuration option and integrating it into the installation process. My main feedback is about some duplicated code in src/backend/static_helpers.rs which could be refactored for better maintainability.
I am having trouble creating individual review comments. Click here to see my feedback.
src/backend/static_helpers.rs (731-743)
This block of code is identical to the one at lines 700-712. To avoid duplication and improve maintainability, consider extracting this logic into a private helper function that can be called from both locations.
@jdx Fair point, do yo prefer omitting |
bc9001c to
8aaf414
Compare
|
@jdx Addressed all above comments + cleaned:
Summary: On Windows, executable extensions ( |
|
@gemini-code-assist review and summarize |
There was a problem hiding this comment.
Code Review
This pull request aims to fix an issue where executable extensions are stripped on Windows during installation. The changes in static_helpers.rs make it so that .exe, .cmd, and .bat extensions are preserved on Windows for backends that use the rename_executable_in_dir function. The documentation for several backends has been updated accordingly.
I've identified a critical compilation error in src/backend/static_helpers.rs related to a 'use of moved value' and have provided a suggestion to fix it.
Also, please note that the implementation seems to apply this fix unconditionally for Windows, which differs from the pull request description that proposed a new keep_exe_extensions_on_windows configuration option. It would be helpful to clarify if this is the intended design.
### 🚀 Features - **(github)** keep exe extensions on Windows by @iki in [#8424](#8424) - **(task)** add `interactive` field for exclusive terminal access by @jdx in [#8491](#8491) - add header comment to generated lockfiles by @ivy in [#8481](#8481) - runtime musl/glibc detection for correct libc variant selection by @jdx in [#8490](#8490) ### 🐛 Bug Fixes - **(github)** use registry platform options during install by @jdx in [#8492](#8492) - **(http)** store tool opts as native TOML to fix platform switching by @jdx in [#8448](#8448) - **(installer)** error if MISE_INSTALL_PATH is a directory by @jdx in [#8468](#8468) - **(prepare)** resolve sources/outputs relative to `dir` when set by @jdx in [#8472](#8472) - **(ruby)** fetch precompiled binary by release tag instead of listing all releases by @jdx in [#8488](#8488) - **(schema)** support structured objects in task depends by @risu729 in [#8463](#8463) - **(task)** replace println!/eprintln! with calm_io in task output macros by @vmaleze in [#8485](#8485) - handle scoped npm package names without backend prefix by @jdx in [#8477](#8477) ### 📦️ Dependency Updates - update ghcr.io/jdx/mise:copr docker digest to c485c4c by @renovate[bot] in [#8484](#8484) - update ghcr.io/jdx/mise:alpine docker digest to 8118bc7 by @renovate[bot] in [#8483](#8483) ### 📦 Registry - disable sd version test by @jdx in [#8489](#8489) ### New Contributors - @ivy made their first contribution in [#8481](#8481) - @iki made their first contribution in [#8424](#8424) ## 📦 Aqua Registry Updates #### New Packages (5) - [`datadog-labs/pup`](https://github.com/datadog-labs/pup) - [`k1LoW/mo`](https://github.com/k1LoW/mo) - [`rtk-ai/rtk`](https://github.com/rtk-ai/rtk) - [`suzuki-shunsuke/docfresh`](https://github.com/suzuki-shunsuke/docfresh) - [`yashikota/exiftool-go`](https://github.com/yashikota/exiftool-go) #### Updated Packages (6) - [`cloudflare/cloudflared`](https://github.com/cloudflare/cloudflared) - [`mozilla/sccache`](https://github.com/mozilla/sccache) - [`owenlamont/ryl`](https://github.com/owenlamont/ryl) - [`spinel-coop/rv`](https://github.com/spinel-coop/rv) - [`technicalpickles/envsense`](https://github.com/technicalpickles/envsense) - [`weaviate/weaviate`](https://github.com/weaviate/weaviate)
Issue
Installing yt-dlp via
mise use -g yt-dlpon Win x64 downloads correctlyyt-dlp_win.zip, but then breaks the executability by renaming the containedyt-dlp.exetoyt-dlp(no extension), based on therename_exebackend option inmise/registry/yt-dlp.toml.History
It actually worked in October 2025 and was most probably broken by a PR #6930 adding yt-dlp rename to fix installing yt-dlp on other platforms discussed in #6649.
Scope
Currently, there're total 5 packages in mise registry that use
rename_exeProposed fix
On Windows, executable extensions (.exe, .bat, .cmd) are automatically preserved for bin and rename_exe options on github, gitlab, forgejo and http backends, but not on deprecated ubi backend (executed using ubi command).
QA
mise.exeon Windows viacargo buildmise use -g yt-dlpand verifyyt-dlp.exeshim