Remove calls to fs.rmdirSync
This commit is contained in:
parent
f151a3cfe6
commit
292203e8b6
9 changed files with 11 additions and 11 deletions
|
|
@ -177,7 +177,7 @@ program
|
|||
|
||||
// Wipe the temp dir
|
||||
logger.info(`Cleaning temp directory ${tempDir}`);
|
||||
fs.rmdirSync(tempDir, { recursive: true });
|
||||
fs.rmSync(tempDir, { recursive: true, force: true });
|
||||
fs.mkdirSync(tempDir, { recursive: true });
|
||||
|
||||
const auth = await getGitHubAuth(
|
||||
|
|
|
|||
|
|
@ -268,8 +268,8 @@ function createToolPath(
|
|||
);
|
||||
logger.debug(`destination ${folderPath}`);
|
||||
const markerPath = `${folderPath}.complete`;
|
||||
fs.rmdirSync(folderPath, { recursive: true });
|
||||
fs.rmdirSync(markerPath, { recursive: true });
|
||||
fs.rmSync(folderPath, { recursive: true, force: true });
|
||||
fs.rmSync(markerPath, { recursive: true, force: true });
|
||||
fs.mkdirSync(folderPath, { recursive: true });
|
||||
return folderPath;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ export async function withTmpDir<T>(
|
|||
const symlinkSubdir = path.join(tmpDir, "symlink");
|
||||
fs.symlinkSync(realSubdir, symlinkSubdir, "dir");
|
||||
const result = await body(symlinkSubdir);
|
||||
fs.rmdirSync(tmpDir, { recursive: true });
|
||||
fs.rmSync(tmpDir, { recursive: true, force: true });
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue