From 31149f3261ae8496f443fdd513169954f0f769a5 Mon Sep 17 00:00:00 2001 From: Dwi Siswanto Date: Sun, 12 Jan 2025 08:55:41 +0700 Subject: [PATCH] fix: `TAR_BAD_ARCHIVE`, enabled `gzip` when `tar.x` Signed-off-by: Dwi Siswanto --- dist/index.js | 3 ++- src/index.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index f6e0144..eb26511 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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 { diff --git a/src/index.ts b/src/index.ts index 754ed96..a3ec851 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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.');