Skip to content

Pass SDL list as multiple arguments #1443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions electron/legendary/games.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,11 @@ class LegendaryGame extends Game {
}

private getSdlList(sdlList: Array<string>) {
// 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}`)
]
}

/**
Expand All @@ -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')

Expand All @@ -389,7 +389,7 @@ class LegendaryGame extends Game {
'--base-path',
path,
withDlcs,
installSdl,
...installSdl,
...workers,
'-y'
]
Expand Down