Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Jan 14, 2025
1 parent a2e88f9 commit 02e39cf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion action.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ const tar = require('tar');
const fs = require('fs');
const os = require('os');

console.error(process.env.PATH);
console.error(process.env);

const dstdir = process.env.INPUT_BINDIR || '/usr/local/bin';

function platform_key() {
Expand All @@ -26,11 +29,15 @@ function downloadAndExtract(url, destination) {

console.log(`extracting tarball…`);

const tar_stream = tar.x({ cwd: destination, strip: 3 });

response
.pipe(tar.x({ cwd: destination, strip: 3 })) // Extract directly to destination
.pipe(tar_stream) // Extract directly to destination
.on('finish', resolve)
.on('error', reject);

tar_stream.on('error', reject);

}).on('error', reject);
});
}
Expand Down

0 comments on commit 02e39cf

Please sign in to comment.