Skip to content

Commit

Permalink
fix: force local paths when extracting on win32 (#1322) (#1323)
Browse files Browse the repository at this point in the history
Co-authored-by: Otávio Jacobi <otaviojacobi@gmail.com>
  • Loading branch information
mdonnalley and otaviojacobi committed Mar 7, 2024
1 parent 644bda0 commit 3a8f37d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tarballs/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ export async function build(
await emptyDir(c.workspace())
const tarballNewLocation = path.join(c.workspace(), path.basename(tarball))
await move(tarball, tarballNewLocation)
await exec(`tar -xzf "${tarballNewLocation}"`, {cwd: c.workspace()})
let tarCommand = `tar -xzf "${tarballNewLocation}"`
if (process.platform === 'win32') tarCommand += ' --force-local';
await exec(tarCommand, {cwd: c.workspace()})
const files = await readdir(path.join(c.workspace(), 'package'), {withFileTypes: true})
await Promise.all(
files.map((i) => move(path.join(c.workspace(), 'package', i.name), path.join(c.workspace(), i.name))),
Expand Down

0 comments on commit 3a8f37d

Please sign in to comment.