Skip to content

Commit 22e2334

Browse files
committed
Update compile-x265.mjs
1 parent 190139a commit 22e2334

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compile-x265.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import path from "path";
33
import { execSync } from "child_process";
44
import { PREFIX } from "./const.mjs";
55
import { compileFunction } from "vm";
6+
import { execSync } from "child_process";
67

78
export const enableX265 = (isMusl, isWindows, isArm) => {
89
if (isWindows) {
@@ -84,13 +85,12 @@ export const enableX265 = (isMusl, isWindows, isArm) => {
8485
};
8586

8687
// Determine whether to use 'cmake' or 'cmake3'
87-
const whichSync = require("child_process").execSync;
8888
let cmakeCmd = "cmake";
8989
try {
90-
whichSync("cmake --version", { stdio: "ignore" });
90+
execSync("cmake --version", { stdio: "ignore" });
9191
} catch {
9292
try {
93-
whichSync("cmake3 --version", { stdio: "ignore" });
93+
execSync("cmake3 --version", { stdio: "ignore" });
9494
cmakeCmd = "cmake3";
9595
} catch {
9696
throw new Error("Neither cmake nor cmake3 is available in PATH.");

0 commit comments

Comments
 (0)