Skip to content

fix(aqua): add executable permissions for zip-extracted binaries#5998

Merged
jdx merged 1 commit into
jdx:mainfrom
itochan:fix/aqua-zip-executable-permissions
Aug 12, 2025
Merged

fix(aqua): add executable permissions for zip-extracted binaries#5998
jdx merged 1 commit into
jdx:mainfrom
itochan:fix/aqua-zip-executable-permissions

Conversation

@itochan

@itochan itochan commented Aug 12, 2025

Copy link
Copy Markdown
Contributor

When extracting binaries from zip archives in the aqua backend, the files were not being marked as executable. This caused tools like CQLabs/homebrew-dcm to fail with permission errors when trying to execute them.

This fix adds a call to file::make_executable() after extracting zip files, matching the behavior of other archive formats (gz, xz, zst, bz2) which already set executable permissions.

Fixes permission denied errors when using aqua backend with zip-packaged tools.

Current mise:

% mise exec aqua:CQLabs/homebrew-dcm -- dcm --version
mise aqua:CQLabs/homebrew-dcm@1.30.1 ✓ installed
mise ERROR "dcm" couldn't exec process: Permission denied
mise ERROR Run with --verbose or MISE_VERBOSE=1 for more information

This PR changes:

% mise uninstall aqua:CQLabs/homebrew-dcm
% @mise exec aqua:CQLabs/homebrew-dcm -- dcm --version
mise aqua:CQLabs/homebrew-dcm@1.30.1 ✓ installed
DCM version: 1.30.1

When extracting binaries from zip archives in the aqua backend, the files
were not being marked as executable. This caused tools like CQLabs/homebrew-dcm
to fail with permission errors when trying to execute them.

This fix adds a call to file::make_executable() after extracting zip files,
matching the behavior of other archive formats (gz, xz, zst, bz2) which
already set executable permissions.

Fixes permission denied errors when using aqua backend with zip-packaged tools.
@itochan

itochan commented Aug 12, 2025

Copy link
Copy Markdown
Contributor Author

The CI "nightly" seems to be failing, but it appears to be happening in other PRs as well.

@jdx jdx merged commit 9592ad0 into jdx:main Aug 12, 2025
17 of 18 checks passed
@itochan itochan deleted the fix/aqua-zip-executable-permissions branch August 13, 2025 01:03
jdx added a commit that referenced this pull request Aug 13, 2025
jdx added a commit that referenced this pull request Aug 13, 2025
…ies" (#6004)

Reverts #5998

this breaks zip files that contain multiple files
jdx pushed a commit that referenced this pull request Aug 13, 2025
### 📦 Registry

- add vfox-yarn as primary yarn backend by
[@jdx](https://github.com/jdx) in
[#5982](#5982)
- add missing description field for a lot of tools by
[@jylenhof](https://github.com/jylenhof) in
[#5966](#5966)
- rename benthos to redpanda-connect by
[@risu729](https://github.com/risu729) in
[#5984](#5984)
- rename coq to rocq by [@risu729](https://github.com/risu729) in
[#5985](#5985)

### 🚀 Features

- **(timeout)** show duration, URL, and config hint on timeouts;
increase fetch timeout default to 10s by [@jdx](https://github.com/jdx)
in [#5991](#5991)

### 🐛 Bug Fixes

- **(aqua)** add executable permissions for zip-extracted binaries by
[@itochan](https://github.com/itochan) in
[#5998](#5998)
- **(core)** auto-repair corrupted pyenv cache by recloning on update
failure by [@jdx](https://github.com/jdx) in
[#6003](#6003)
- duplicate versions and validation in `mise tool` by
[@jdx](https://github.com/jdx) in
[#6001](#6001)

### 📚 Documentation

- **(tools)** document per-tool postinstall option in [tools] by
[@jdx](https://github.com/jdx) in
[#5993](#5993)
- Update install instructions for nushell by
[@Joniator](https://github.com/Joniator) in
[#5981](#5981)
- README.md typo by [@jdx](https://github.com/jdx) in
[#5990](#5990)

### ◀️ Revert

- Revert "docs: Update install instructions for nushell" by
[@jdx](https://github.com/jdx) in
[#5983](#5983)
- Revert "fix(aqua): add executable permissions for zip-extracted
binaries" by [@jdx](https://github.com/jdx) in
[#6004](#6004)

### 📦️ Dependency Updates

- update taiki-e/install-action digest to 2c73a74 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#5962](#5962)
- update docker/metadata-action digest to c1e5197 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#5961](#5961)
- update docker/login-action digest to 184bdaa by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#5958](#5958)

### Chore

- cargo up by [@jdx](https://github.com/jdx) in
[#5992](#5992)

### New Contributors

- @Joniator made their first contribution in
[#5981](#5981)
- @jylenhof made their first contribution in
[#5966](#5966)
jdx pushed a commit that referenced this pull request Aug 13, 2025
Reapplies #5998 (reverted in
#6004) with some changes.

Some tools don't set `+x` permissions to their executable files in the
archives:

- [`powershell`](https://github.com/PowerShell/PowerShell)
(#5552)
- [`bob`](https://github.com/MordechaiHadad/bob)
- [`gitu`](https://github.com/altsem/gitu)
- [`mirrord`](https://github.com/metalbear-co/mirrord)
- [`CQLabs/homebrew-dcm`](https://github.com/CQLabs/homebrew-dcm)
(#5998)

Since both `.tar` and `.zip` can include permissions in the archive,
this is not a mise bug, but their issues.
However, I think supporting them would be beneficial for some users.

`aqua` supports this because they use shims. `ubi` backend also supports
this but I'm not sure why.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
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.

2 participants