Skip to content

Commit 8f698b7

Browse files
committed
refactor rm func
1 parent 2bf1c12 commit 8f698b7

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

packages/@apphosting/adapter-angular/e2e/run-local.ts

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,16 @@ import { parse as parseYaml } from "yaml";
66
import { spawn } from "child_process";
77
import fsExtra from "fs-extra";
88

9-
const { readFileSync, mkdirp, readJSON, writeJSON, rmSync } = fsExtra;
9+
const { readFileSync, mkdirp, readJSON, writeJSON, rm } = fsExtra;
1010
const __dirname = dirname(fileURLToPath(import.meta.url));
1111

1212
const starterTemplateDir = "../../../starters/angular/basic";
1313

1414
const errors: any[] = [];
15-
console.log("About to remove runs directory (sync)");
16-
try {
17-
rmSync(join(__dirname, "runs"), { recursive: true });
18-
console.log("Runs directory removed successfully (sync)");
19-
} catch (err) {
20-
console.error("Error removing runs directory (sync):", err);
21-
// console.error("Error details:", err.message, err.stack);
22-
// if (err.code) {
23-
// console.error("Error code:", err.code); // Check error codes
24-
// }
25-
}
26-
console.log("Finished removal attempt");
15+
16+
await rm(join(__dirname, "runs"), { recursive: true }).catch(() => undefined);
17+
18+
console.log("\nBuilding and starting test projects in parallel...");
2719

2820
const tests = await Promise.all(
2921
[

0 commit comments

Comments
 (0)