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' ]