mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-03 08:43:48 +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) {
|
||||
const ymlPath = path.join(gamePath, "setup.yml");
|
||||
await writeFile(ymlPath, generateYML(game));
|
||||
const subprocess = spawn(`lutris --install '${ymlPath}'`, {
|
||||
const lutris = spawn('lutris', ['--install', `'${ymlPath}'`], {
|
||||
shell: true,
|
||||
detached: true,
|
||||
stdio: 'ignore'
|
||||
});
|
||||
subprocess.unref();
|
||||
lutris.unref();
|
||||
} else {
|
||||
spawn(`wine '${setupPath}'`, { shell: true });
|
||||
const wine = spawn('wine', [`'${setupPath}'`], {
|
||||
shell: true,
|
||||
detached: true,
|
||||
stdio: 'ignore'
|
||||
});
|
||||
wine.unref();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user