Skip to content

Commit

Permalink
B Fixes flaky removal of working directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jwloka committed May 7, 2024
1 parent c620c9c commit 240de58
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/testing/src/compilation/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
type CompilerAddon,
type CompilerOptions,
} from "@quatico/websmith-core";
import { rmSync } from "fs";
import { Module } from "module";
import { basename, dirname, extname, isAbsolute, join } from "path";
import requireFromString from "require-from-string";
Expand Down Expand Up @@ -112,7 +111,7 @@ export class CompilationEnv {
if (this.isVirtual()) {
this.system.readDirectory(target).forEach(it => this.system.deleteFile!(it));
} else {
rmSync(target, { recursive: true });
ts.sys.readDirectory(target).forEach(it => this.system.deleteFile!(it));
}
}
return this;
Expand Down

0 comments on commit 240de58

Please sign in to comment.