Skip to content

Commit

Permalink
chore: upstream spec runner no longer uses fs-extra
Browse files Browse the repository at this point in the history
  • Loading branch information
dsanders11 committed Oct 31, 2024
1 parent 92ec55c commit fe9c6b6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions electron/spec-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

import * as childProcess from "node:child_process";
import * as crypto from "node:crypto";
import * as fs from "node:fs";
import * as path from "node:path";

export async function setupSpecRunner(electronRoot: string) {
const fs = require(path.resolve(electronRoot, "node_modules", "fs-extra"));
const { hashElement } = require(
path.resolve(electronRoot, "node_modules", "folder-hash"),
);
Expand Down Expand Up @@ -89,7 +89,10 @@ export async function setupSpecRunner(electronRoot: string) {
npm_config_yes: "true",
};
if (fs.existsSync(path.resolve(dir, "node_modules"))) {
await fs.remove(path.resolve(dir, "node_modules"));
await fs.promises.rm(path.resolve(dir, "node_modules"), {
force: true,
recursive: true,
});
}
const { status } = childProcess.spawnSync(
NPX_CMD,
Expand Down

0 comments on commit fe9c6b6

Please sign in to comment.