mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 01:45:28 +00:00
[cli] Fall back to "Windows" platform by default
This commit is contained in:
parent
e44998b786
commit
cc44149e68
|
@ -664,6 +664,8 @@ disable_auto_aliasing = false
|
|||
default_platform = Windows
|
||||
; (macOS) Disable automatic CrossOver use
|
||||
disable_auto_crossover = false
|
||||
; Fallback to "Windows" platform if native version unavailable
|
||||
install_platform_fallback = true
|
||||
|
||||
[Legendary.aliases]
|
||||
; List of aliases for simpler CLI use
|
||||
|
|
|
@ -783,10 +783,14 @@ class LegendaryCLI:
|
|||
|
||||
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 info --platform {args.platform}" and make '
|
||||
f'sure the app is available for the specified platform.')
|
||||
exit(1)
|
||||
if self.core.lgd.config.getboolean('Legendary', 'install_platform_fallback', fallback=True):
|
||||
logger.warning(f'App has no asset for platform "{args.platform}", falling back to "Windows".')
|
||||
args.platform = 'Windows'
|
||||
else:
|
||||
logger.error(f'No app asset found for platform "{args.platform}", run '
|
||||
f'"legendary info --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.')
|
||||
|
|
Loading…
Reference in a new issue