mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[cli] Error out if no asset exists for specified platform
This commit is contained in:
parent
d61946d15d
commit
363ac15faa
|
@ -739,6 +739,16 @@ class LegendaryCLI:
|
||||||
f'activate and/or run the game.')
|
f'activate and/or run the game.')
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
|
if args.platform not in game.asset_infos:
|
||||||
|
if not args.no_install:
|
||||||
|
logger.error(f'No app asset found for platform "{args.platform}", run '
|
||||||
|
f'"legendary list-games --platform {args.platform}" and make '
|
||||||
|
f'sure the app is available for the specified platform.')
|
||||||
|
exit(1)
|
||||||
|
else:
|
||||||
|
logger.warning(f'No asset found for platform "{args.platform}", '
|
||||||
|
f'trying anyway since --no-install is set.')
|
||||||
|
|
||||||
if game.is_dlc:
|
if game.is_dlc:
|
||||||
logger.info('Install candidate is DLC')
|
logger.info('Install candidate is DLC')
|
||||||
app_name = game.metadata['mainGameItem']['releaseInfo'][0]['appId']
|
app_name = game.metadata['mainGameItem']['releaseInfo'][0]['appId']
|
||||||
|
|
Loading…
Reference in a new issue