Skip to content

Commit

Permalink
fix: always close file handles to stdout/stderr logs (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
Junyan committed May 17, 2023
1 parent f1baa9a commit f9e4369
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/chrome-launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,16 +415,16 @@ class Launcher {
}

destroyTmp() {
// Only clean up the tmp dir if we created it.
if (this.userDataDir === undefined || this.opts.userDataDir !== undefined) {
return;
}

if (this.outFile) {
this.fs.closeSync(this.outFile);
delete this.outFile;
}

// Only clean up the tmp dir if we created it.
if (this.userDataDir === undefined || this.opts.userDataDir !== undefined) {
return;
}

if (this.errFile) {
this.fs.closeSync(this.errFile);
delete this.errFile;
Expand Down

0 comments on commit f9e4369

Please sign in to comment.