diff --git a/src/main/config/runtime-config.ts b/src/main/config/runtime-config.ts index ca80ff3..a608b0b 100644 --- a/src/main/config/runtime-config.ts +++ b/src/main/config/runtime-config.ts @@ -60,7 +60,9 @@ export function parseEnvIntInRange(name: string, fallback: number, min: number, const parsedValue = Number.parseInt(rawValue, 10); if (!Number.isFinite(parsedValue) || parsedValue < min || parsedValue > max) { - throw new Error(`The ${name} variable must be an integer between ${min} and ${max}. Received value: '${rawValue}'.`); + throw new Error( + `The ${name} variable must be an integer between ${min} and ${max}. Received value: '${rawValue}'.`, + ); } return parsedValue; diff --git a/src/main/nodecg/process-manager.ts b/src/main/nodecg/process-manager.ts index 46bd1c2..0c00f5c 100644 --- a/src/main/nodecg/process-manager.ts +++ b/src/main/nodecg/process-manager.ts @@ -52,7 +52,12 @@ export function createNodecgProcessManager({ let lastStderrLine: string | null = null; const startNodecgProcess = async (): Promise => { - validateNodecgInstall(nodecgRootPath, resolvedDeps.platform, resolvedDeps.pathExists, resolvedDeps.hasReadWriteAccess); + validateNodecgInstall( + nodecgRootPath, + resolvedDeps.platform, + resolvedDeps.pathExists, + resolvedDeps.hasReadWriteAccess, + ); const portAsNumber = Number.parseInt(appConfig.nodecgPort, 10); const isPortAvailable = await resolvedDeps.probePortAvailable(portAsNumber); @@ -212,7 +217,12 @@ function validateNodecgInstall( ): void { const packageJsonPath = path.join(nodecgRootPath, "package.json"); const nodecgDependencyPath = path.join(nodecgRootPath, "node_modules", "nodecg", "package.json"); - const nodecgCliPath = path.join(nodecgRootPath, "node_modules", ".bin", platform === "win32" ? "nodecg.cmd" : "nodecg"); + const nodecgCliPath = path.join( + nodecgRootPath, + "node_modules", + ".bin", + platform === "win32" ? "nodecg.cmd" : "nodecg", + ); const bundleAssetDirs = ["dashboard", "graphics", "extension", "extensions"].map((dir) => path.join(nodecgRootPath, dir), );