From 156b4716f4dbce58df5d3da3a3e9a20248a9a102 Mon Sep 17 00:00:00 2001 From: derrod Date: Tue, 28 Sep 2021 05:20:40 +0200 Subject: [PATCH] [cli] Add --json to Origin launch as well --- legendary/cli.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/legendary/cli.py b/legendary/cli.py index 1ce59d5..8de659b 100644 --- a/legendary/cli.py +++ b/legendary/cli.py @@ -585,6 +585,10 @@ class LegendaryCLI: exit(1) origin_uri = self.core.get_origin_uri(args.app_name, args.offline) + if args.json: + print(json.dumps(dict(uri=origin_uri))) + return + logger.debug(f'Opening Origin URI: {origin_uri}') if os.name == 'nt': return webbrowser.open(origin_uri)