From a9f621214b825ccd243a4354f68ad4b877390c6c Mon Sep 17 00:00:00 2001 From: Fhilipe Coelho Date: Fri, 12 Apr 2024 00:05:55 -0300 Subject: [PATCH] fix: handle quotes in game name --- src/main/events/library/open-game.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/events/library/open-game.ts b/src/main/events/library/open-game.ts index ab987ae7..9ac38950 100644 --- a/src/main/events/library/open-game.ts +++ b/src/main/events/library/open-game.ts @@ -24,6 +24,7 @@ const openGame = async ( if (fs.existsSync(gamePath)) { const setupPath = path.join(gamePath, "setup.exe"); + console.log(setupPath); if (fs.existsSync(setupPath)) { if (process.platform === "win32") { shell.openExternal(setupPath); @@ -31,15 +32,16 @@ const openGame = async ( if (process.platform === "linux") { if (spawnSync('which', ['lutris']).status === 0) { const ymlPath = path.join(gamePath, "setup.yml"); + console.log(ymlPath) await writeFile(ymlPath, generateYML(game)); - const lutris = spawn('lutris', ['--install', `'${ymlPath}'`], { + const lutris = spawn('lutris', ['--install', `"${ymlPath}"`], { shell: true, detached: true, stdio: 'ignore' }); lutris.unref(); } else { - const wine = spawn('wine', [`'${setupPath}'`], { + const wine = spawn('wine', [`"${setupPath}"`], { shell: true, detached: true, stdio: 'ignore'