denoland / denoland/std

Tar doesn't support sparse tar files

Open
#3,127 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
3.6k
Forks
681
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

I'm using this code to decompress tar.gz files:
https://github.com/oscarotero/dbin/blob/d12abeb82b72ba079cca33eef4621dfd55b57047/mod.ts#L161-L186

This code is used to download binary files from the assets of github releases so they can be executed. One example is [Pagefind](https://github.com/CloudCannon/pagefind/releases/tag/v0.10.7) that is downloaded [according to the this configuration in Lume](https://github.com/lumeland/lume/blob/12beb2a83eba7de6f76385b25d4fab385faf1242/deps/pagefind.ts#L14-L32).

According to this comment: https://github.com/lumeland/lume/issues/362#issuecomment-1396404347 the function to uncompress tag files doesn't support sparse files, making the binary file not executable.

**Environment**

This specific issue only happens on MacOS on M1/ARM because the binary targeted for this architecture is compressed as sparse tar. I cannot reproduce this issue because my computer is MacOS on Intel.

- OS: MacOS on M1/ARM
- deno version: 1.29.4
- std version: 0.139.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.