refactor: use optional catch binding (#39232)
This commit is contained in:
parent
8dea783805
commit
c9bae5da8e
11 changed files with 17 additions and 17 deletions
|
@ -116,7 +116,7 @@ function waitForNewFileInDir (dir: string): Promise<string[]> {
|
|||
function readdirIfPresent (dir: string): string[] {
|
||||
try {
|
||||
return fs.readdirSync(dir);
|
||||
} catch (e) {
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
@ -402,7 +402,7 @@ ifdescribe(!isLinuxOnArm && !process.mas && !process.env.DISABLE_CRASH_REPORTER_
|
|||
try {
|
||||
fs.rmdirSync(dir, { recursive: true });
|
||||
fs.mkdirSync(dir);
|
||||
} catch (e) { /* ignore */ }
|
||||
} catch { /* ignore */ }
|
||||
|
||||
// 1. start the crash reporter.
|
||||
await remotely((port: number) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue