Skip to content

fix(tools): unpack tar.xz release assets instead of running them - #38

Merged
savruun merged 1 commit into
masterfrom
fix/macos-bin-execution
Aug 5, 2026
Merged

fix(tools): unpack tar.xz release assets instead of running them#38
savruun merged 1 commit into
masterfrom
fix/macos-bin-execution

Conversation

@savruun

@savruun savruun commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

1axen/blink ships .tar.xz for macos and linux. Nothing sniffed xz, so it fell through to the branch that means "these bytes are the executable" and the compressed archive got written to the binary's path. Every run after that said cannot execute binary file, which points nowhere near the real problem. Windows was fine because that one asset is a .tar.gz.

xz is decompressed now. The crate is pure rust rather than the liblzma bindings so the release matrix does not grow a C build step for the sake of one archive format per install.

Everything else compressed that lpm has no decompressor for is sniffed too and says so instead of falling into the same trap. That is zstd, bzip2, 7z and rar.

What comes out of a decompressor is checked for a tar header before being treated as one, so a bare .xz or .gz holding just the binary works as well as a .tar.xz holding a directory.

1axen/blink ships .tar.xz for macos and linux. Nothing sniffed xz, so it
fell through to the branch that means "these bytes are the executable"
and the compressed archive got written to the binary's path. Every run
after that said cannot execute binary file, which points nowhere near the
real problem. Windows was fine because that one asset is a .tar.gz.

xz is decompressed now. The crate is pure rust rather than the liblzma
bindings so the release matrix does not grow a C build step for the sake
of one archive format per install.

Everything else compressed that lpm has no decompressor for is sniffed
too and says so instead of falling into the same trap. That is zstd,
bzip2, 7z and rar.

What comes out of a decompressor is checked for a tar header before being
treated as one, so a bare .xz or .gz holding just the binary works as
well as a .tar.xz holding a directory.
@savruun
savruun merged commit 31c08f8 into master Aug 5, 2026
9 checks passed
@savruun
savruun deleted the fix/macos-bin-execution branch August 5, 2026 02:20
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