facebook / dotslash

Simplified executable deployment
https://dotslash-cli.com
Apache License 2.0
557 stars 14 forks source link

Some tar.gz archives dont decompress correctly #27

Open kageiit opened 5 months ago

kageiit commented 5 months ago

Take for example - https://github.com/astral-sh/ruff/releases/download/v0.4.2/ruff-0.4.2-aarch64-apple-darwin.tar.gz

When decompressing with tar - tar -xvf ruff-0.4.2-aarch64-apple-darwin.tar.gz , it outputs ruff

But with dotslash v0.41.0, it outputs DOTSLASH_CACHE/23/d6c44ba88ccffacf9de63082a597f3d2ad77f7/GNUSparseFile.0/ruff

Seems like this entry type variant might need special handling possibly

https://docs.rs/tar/latest/tar/enum.EntryType.html#variant.GNUSparse

Relevant config for dtslash

"macos-aarch64": {
      "size": 8144818,
      "hash": "blake3",
      "digest": "02b131cb0da1e157ddf1ab96cc100c25b519d052a4cf6c55602614425b2fa37d",
      "format": "tar.gz",
      "path": "GNUSparseFile.0/ruff",
      "providers": [
        {
          "url": "https://github.com/astral-sh/ruff/releases/download/v0.4.2/ruff-0.4.2-aarch64-apple-darwin.tar.gz"
        }
      ]
    }

Interestingly, running GNUSparseFile.0/ruff via dotslash fails. But running the directly downloaded binary works as expected