We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
fs.rmSync
1 parent 20b0078 commit bff7cb2Copy full SHA for bff7cb2
reference/javascript/build.ts
@@ -426,7 +426,9 @@ function pullRemote(remote: Remote, latestSha: string) {
426
const target = remotePath(remote);
427
const url = `https://github.com/${remote.repo}/archive/refs/heads/${branch}.tar.gz`;
428
console.info(`Fetching remote tarball ${remote.repo}/${branch}`);
429
- exec(["rm -rf", target]);
+ if (fs.existsSync(target)) {
430
+ fs.rmSync(target, { recursive: true, force: true });
431
+ }
432
exec(["mkdir -p", target]);
433
exec([`curl -L -s`, url, `| tar -xz --strip-components=1 -C`, target]);
434
const shaFile = path.join(target, ".sha");
0 commit comments