mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-03 16:53:47 +03:00
refactor: use args array in spawn function
This commit is contained in:
parent
54e29c12d4
commit
9602ffbd20
@ -32,14 +32,19 @@ const openGame = async (
|
|||||||
if (spawnSync('which', ['lutris']).status === 0) {
|
if (spawnSync('which', ['lutris']).status === 0) {
|
||||||
const ymlPath = path.join(gamePath, "setup.yml");
|
const ymlPath = path.join(gamePath, "setup.yml");
|
||||||
await writeFile(ymlPath, generateYML(game));
|
await writeFile(ymlPath, generateYML(game));
|
||||||
const subprocess = spawn(`lutris --install '${ymlPath}'`, {
|
const lutris = spawn('lutris', ['--install', `'${ymlPath}'`], {
|
||||||
shell: true,
|
shell: true,
|
||||||
detached: true,
|
detached: true,
|
||||||
stdio: 'ignore'
|
stdio: 'ignore'
|
||||||
});
|
});
|
||||||
subprocess.unref();
|
lutris.unref();
|
||||||
} else {
|
} else {
|
||||||
spawn(`wine '${setupPath}'`, { shell: true });
|
const wine = spawn('wine', [`'${setupPath}'`], {
|
||||||
|
shell: true,
|
||||||
|
detached: true,
|
||||||
|
stdio: 'ignore'
|
||||||
|
});
|
||||||
|
wine.unref();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user