From 91fa0258645a2b45ad2556e8d0e0f9c9c013779d Mon Sep 17 00:00:00 2001 From: thatben Date: Wed, 19 Feb 2025 13:18:22 +0100 Subject: [PATCH] Adds quotes to fix paths with spaces --- src/handlers/installationHandlers.js | 2 +- src/handlers/nodeHandlers.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/handlers/installationHandlers.js b/src/handlers/installationHandlers.js index dd0326f..9141bc0 100644 --- a/src/handlers/installationHandlers.js +++ b/src/handlers/installationHandlers.js @@ -60,7 +60,7 @@ export async function getCodexVersion(config) { if (config.codexExe.length < 1) return ""; try { - const version = await runCommand(`${config.codexExe} --version`); + const version = await runCommand(`"${config.codexExe}" --version`); if (version.length < 1) throw new Error("Version info not found."); return version; } catch (error) { diff --git a/src/handlers/nodeHandlers.js b/src/handlers/nodeHandlers.js index ce3073e..b6dc09e 100644 --- a/src/handlers/nodeHandlers.js +++ b/src/handlers/nodeHandlers.js @@ -84,8 +84,8 @@ export async function runCodex(config, showNavigationMenu) { const executable = config.codexExe; const args = [ - `--data-dir=${config.dataDir}`, - `--log-file=${logFilePath}`, + `--data-dir="${config.dataDir}"`, + `--log-file="${logFilePath}"`, `--disc-port=${discPort}`, `--listen-addrs=/ip4/0.0.0.0/tcp/${listenPort}`, `--nat=${nat}`, @@ -94,7 +94,7 @@ export async function runCodex(config, showNavigationMenu) { ]; const command = - `${executable} ${args.join(" ")}` + `"${executable}" ${args.join(" ")}` console.log(showInfoMessage( '🚀 Codex node is running...\n\n' +