mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[cli] Fix --dry-run for Origin launch
This commit is contained in:
parent
0bc543518c
commit
8da4b55987
|
@ -641,8 +641,12 @@ class LegendaryCLI:
|
||||||
return self._print_json(dict(uri=origin_uri), args.pretty_json)
|
return self._print_json(dict(uri=origin_uri), args.pretty_json)
|
||||||
|
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
logger.debug(f'Opening Origin URI: {origin_uri}')
|
if args.dry_run:
|
||||||
return webbrowser.open(origin_uri)
|
logger.info(f'Origin URI: {origin_uri}')
|
||||||
|
else:
|
||||||
|
logger.debug(f'Opening Origin URI: {origin_uri}')
|
||||||
|
webbrowser.open(origin_uri)
|
||||||
|
return
|
||||||
|
|
||||||
# on linux, require users to specify at least the wine binary and prefix in config or command line
|
# on linux, require users to specify at least the wine binary and prefix in config or command line
|
||||||
command = self.core.get_app_launch_command(args.app_name, wrapper=args.wrapper,
|
command = self.core.get_app_launch_command(args.app_name, wrapper=args.wrapper,
|
||||||
|
@ -658,8 +662,11 @@ class LegendaryCLI:
|
||||||
return
|
return
|
||||||
|
|
||||||
command.append(origin_uri)
|
command.append(origin_uri)
|
||||||
logger.debug(f'Opening Origin URI with command: {shlex.join(command)}')
|
if args.dry_run:
|
||||||
subprocess.Popen(command, env=full_env)
|
logger.info(f'Origin launch command: {shlex.join(command)}')
|
||||||
|
else:
|
||||||
|
logger.debug(f'Opening Origin URI with command: {shlex.join(command)}')
|
||||||
|
subprocess.Popen(command, env=full_env)
|
||||||
|
|
||||||
def install_game(self, args):
|
def install_game(self, args):
|
||||||
args.app_name = self._resolve_aliases(args.app_name)
|
args.app_name = self._resolve_aliases(args.app_name)
|
||||||
|
|
Loading…
Reference in a new issue