This commit is contained in:
TypeScript Bot
2022-05-02 16:38:51 +00:00
parent 9fa173d1fb
commit 3819d3e5c4

View File

@@ -321,10 +321,9 @@ function downloadNpmPackage(name: string, version: string, outDir: string): stri
const outPath = path.join(outDir, name);
initDir(outPath);
const isBsdTar = cp.execFileSync("tar", ["--version"], cpOpts).includes("bsdtar");
const args =
isBsdTar
? ["-xz", "-f", tarballName, "-C", outPath]
: ["-xz", "-f", tarballName, "-C", outPath, "--warning=none"];
const args = isBsdTar
? ["-xz", "-f", tarballName, "-C", outPath]
: ["-xz", "-f", tarballName, "-C", outPath, "--warning=none"];
cp.execFileSync("tar", args, cpOpts);
fs.unlinkSync(tarballName);
return path.join(outPath, getPackageDir(outPath));