mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-01-23 21:44:55 +03:00
feat: look for a single alternative setup when installing
This commit is contained in:
parent
f88cd61a23
commit
95a0d55426
@ -54,12 +54,14 @@ const openGameInstaller = async (
|
||||
}
|
||||
|
||||
const gamePathFileNames = fs.readdirSync(gamePath);
|
||||
const gameAlternativeSetupPath = gamePathFileNames.find(
|
||||
const gamePathExecutableFiles = gamePathFileNames.filter(
|
||||
(fileName: string) => path.extname(fileName).toLowerCase() === ".exe"
|
||||
);
|
||||
|
||||
if (gameAlternativeSetupPath) {
|
||||
return executeGameInstaller(path.join(gamePath, gameAlternativeSetupPath));
|
||||
if (gamePathExecutableFiles.length === 1) {
|
||||
return executeGameInstaller(
|
||||
path.join(gamePath, gamePathExecutableFiles[0])
|
||||
);
|
||||
}
|
||||
|
||||
if (spawnSync("which", ["lutris"]).status === 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user