diff --git a/dist/index.js b/dist/index.js index 1133f83..6f6dea7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -139699,7 +139699,7 @@ function uncompress(dest, tarFile, strip) { function compress(dir, outputFile) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => { - create({ z: true }, [dir]) + create({ z: true, C: external_path_.dirname(dir) }, [dir]) .pipe(external_fs_.createWriteStream(outputFile)) .on("close", () => resolve()) .on("error", reject); diff --git a/index.ts b/index.ts index 81a67cc..b2d7d64 100644 --- a/index.ts +++ b/index.ts @@ -273,7 +273,7 @@ async function uncompress( async function compress(dir: string, outputFile: string): Promise { return new Promise((resolve, reject) => { tar - .c({ z: true }, [dir]) + .c({ z: true, C: path.dirname(dir) }, [dir]) .pipe(fs.createWriteStream(outputFile)) .on("close", () => resolve()) .on("error", reject);