Skip to content

Commit

Permalink
Fix tarballs containing paths from fs root
Browse files Browse the repository at this point in the history
  • Loading branch information
ManasJayanth committed Jul 28, 2024
1 parent 4a96b1c commit 8bedbbe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ async function uncompress(
async function compress(dir: string, outputFile: string): Promise<void> {
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);
Expand Down

0 comments on commit 8bedbbe

Please sign in to comment.