From ce478df33c04798802048467d162bf9c85f80621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathis=20Dr=C3=B6ge?= Date: Mon, 6 Jun 2022 18:08:13 +0200 Subject: [PATCH] Pass SDL list as multiple arguments --- electron/legendary/games.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/electron/legendary/games.ts b/electron/legendary/games.ts index 272e093072..6f8a63ec30 100644 --- a/electron/legendary/games.ts +++ b/electron/legendary/games.ts @@ -352,13 +352,11 @@ class LegendaryGame extends Game { } private getSdlList(sdlList: Array) { - // Legendary needs an empty tag for it to download the other needed files - const defaultTag = ' --install-tag=""' - return sdlList - .map((tag) => `--install-tag ${tag}`) - .join(' ') - .replaceAll("'", '') - .concat(defaultTag) + return [ + // Legendary needs an empty tag for it to download the other needed files + '--install-tag=""', + ...sdlList.map((tag) => `--install-tag=${tag}`) + ] } /** @@ -377,7 +375,9 @@ class LegendaryGame extends Game { ) const workers = maxWorkers ? ['--max-workers', `${maxWorkers}`] : [] const withDlcs = installDlcs ? '--with-dlcs' : '--skip-dlcs' - const installSdl = sdlList.length ? this.getSdlList(sdlList) : '--skip-sdl' + const installSdl = sdlList.length + ? this.getSdlList(sdlList) + : ['--skip-sdl'] const logPath = join(heroicGamesConfigPath, this.appName + '.log') @@ -389,7 +389,7 @@ class LegendaryGame extends Game { '--base-path', path, withDlcs, - installSdl, + ...installSdl, ...workers, '-y' ]