Conversation
…ready ends in .exe When a package's Windows override URL already includes .exe (e.g., cloud-sql-proxy), the complete_windows_ext logic would append another .exe, producing URLs like "tool.exe.exe". Add a check to skip appending .exe when the URL or asset string already ends with it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR fixes a bug in the aqua backend where calling Confidence Score: 5/5Safe to merge — targeted, well-tested bug fix with no logic regressions All findings are P2 or lower; the fix correctly prevents double .exe, the refactoring is semantically equivalent for existing non-.exe templates, and new tests verify both the fixed case and the positive case. No files require special attention Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[url() / asset_strs() called] --> B[parse_aqua_str — template substitution]
B --> C[complete_windows_ext_to_asset]
C --> D{os == 'windows'?}
D -- No --> E[return as-is]
D -- Yes --> F{s.ends_with('.exe')?}
F -- Yes --> G[return as-is — no double .exe]
F -- No --> H{complete_windows_ext && format == 'raw'?}
H -- Yes --> I[append .exe]
H -- No --> E
Reviews (4): Last reviewed commit: "[autofix.ci] apply automated fixes" | Re-trigger Greptile |
There was a problem hiding this comment.
Code Review
This pull request modifies the AquaPackage implementation in crates/aqua-registry/src/types.rs to prevent redundant .exe extensions when the complete_windows_ext flag is set for Windows packages in raw format. It adds checks to ensure the extension is only appended if it is not already present. Additionally, several unit tests were added to verify this behavior and ensure no regressions. I have no feedback to provide.
|
The fix is correct — upstream aqua has the same guard. In if strings.HasSuffix(asset, ".exe") {
return asset
}So the registry data is fine — mise was just missing this check that aqua has. However, upstream's logic is more nuanced than just the This comment was generated by Claude Code. |
Consolidate duplicated Windows .exe extension logic into a single helper method, mirroring upstream aqua's completeWindowsExtToAsset decision tree. Also fix url() to apply .exe after template expansion (matching upstream). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Addressed the review feedback — refactored to extract a Changes in the latest commit:
This comment was generated by Claude Code. |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
### 🚀 Features - **(config)** report env files in config ls and doctor output by @SamSoldatenko in [#8853](#8853) - add support for token sources in GitLab and Forgejo by @roele in [#8868](#8868) ### 🐛 Bug Fixes - **(aqua)** prevent double .exe extension when Windows override URL already ends in .exe by @yusei-wy in [#8863](#8863) - **(bash)** avoid duplicate trust warning after cd by @timothysparg in [#8920](#8920) - **(env)** prevent config root injection into PATH via _.source by @jdx in [#8936](#8936) - **(install)** suppress spurious dependency warning when tool is configured by @jdx in [#8923](#8923) ### 📚 Documentation - **(node)** add section on pinning npm version by @jdx in [#8925](#8925) - add Windows default paths and mise.toml examples alongside CLI commands by @jdx in [#8926](#8926) - clarify common sources of confusion from GitHub discussions by @jdx in [#8927](#8927) - clarify Python venv mechanisms, JAVA_HOME behavior, and activation performance by @jdx in [#8928](#8928) - add FAQ and troubleshooting entries based on common Discord questions by @jdx in [#8930](#8930) ### New Contributors - @SamSoldatenko made their first contribution in [#8853](#8853) - @yusei-wy made their first contribution in [#8863](#8863)
Related: #8864
Summary
.exe(e.g.,GoogleCloudPlatform/cloud-sql-proxy), thecomplete_windows_extlogic appended another.exe, producing URLs liketool.exe.execomplete_windows_ext_to_asset()helper method that mirrors upstream aqua'scompleteWindowsExtToAssetdecision tree, consolidating duplicated logic fromurl()andasset_strs()into a single placeurl()to apply.exeafter template expansion (matching upstream behavior).exeand that.exeis still appended when missingChanges
complete_windows_ext_to_asset()helper — guards against double.exe, checkscomplete_windows_extflag andformat == "raw"asset_strs()— replaced 2 duplicated if/else blocks with helper callsurl()— simplified toparse_aqua_strthen helper call (template expansion before.exeappend, matching upstream)Affected packages
37 packages in the aqua registry are affected, including
cli/cli,kubernetes/kubernetes/kubectl,gruntwork-io/terragrunt,open-policy-agent/opa,rust-lang/rustup, etc.Test plan
cargo test -p aqua-registry— all 44 tests pass (3 new tests added)mise lockon a project usingaqua:GoogleCloudPlatform/cloud-sql-proxyon Windows🤖 Generated with Claude Code