fix: TAR_BAD_ARCHIVE, enabled gzip when tar.x

Signed-off-by: Dwi Siswanto <git@dw1.io>
This commit is contained in:
Dwi Siswanto 2025-01-12 08:55:41 +07:00
parent 963e4b0b96
commit 31149f3261
No known key found for this signature in database
GPG Key ID: 3BB198907EF44CED
2 changed files with 4 additions and 2 deletions

3
dist/index.js vendored
View File

@ -128,7 +128,8 @@ function get_slim() {
const tar = require('tar');
yield tar.x({
file: const_1.path.join(const_1.TMP_DIR, FILENAME),
cwd: const_1.TMP_DIR
cwd: const_1.TMP_DIR,
gzip: true
});
}
else {

View File

@ -129,7 +129,8 @@ async function get_slim() {
const tar = require('tar');
await tar.x({
file: path.join(TMP_DIR, FILENAME),
cwd: TMP_DIR
cwd: TMP_DIR,
gzip: true
});
} else {
throw new Error('Unexpected file extension.');