| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -168,7 +168,16 @@ export async function extractTarZst( | |||
| 168 | 168 | ||
| 169 | 169 | try { | |
| 170 | 170 | // Initialize args | |
| 171 | - const args = ["-x", "--zstd"]; | ||
| 171 | + // | ||
| 172 | + // `--ignore-zeros` means that trailing zero bytes at the end of an archive will be read | ||
| 173 | + // by `tar` in case a further concatenated archive follows. Otherwise when a tarball built | ||
| 174 | + // by GNU tar, which writes many trailing zeroes, is read by BSD tar, which expects less, then | ||
| 175 | + // BSD tar can hang up the pipe to its filter program early, and if that program is `zstd` | ||
| 176 | + // then it will try to write the remaining zeroes, get an EPIPE error because `tar` has closed | ||
| 177 | + // its end of the pipe, return 1, and `tar` will pass the error along. | ||
| 178 | + // | ||
| 179 | + // See also https://github.com/facebook/zstd/issues/4294 | ||
| 180 | + const args = ["-x", "--zstd", "--ignore-zeros"]; | ||
| 172 | 181 | ||
| 173 | 182 | if (tarVersion.type === "gnu") { | |
| 174 | 183 | // Suppress warnings when using GNU tar to extract archives created by BSD tar | |
| Back | FazBrowse Home | New Git URL |
0 commit comments