1
0
Fork 0
mirror of synced 2024-05-06 05:32:58 +12:00

Rare: Move sub-commands implementations in the commands subfolder

Right now we have two commands, and with possible third one comming soon.
This commit is contained in:
loathingKernel 2024-02-05 21:27:50 +02:00
parent 2f84a501d5
commit 6a747ce0f7
7 changed files with 4 additions and 4 deletions

0
rare/commands/reaper.py Normal file
View file

View file

@ -59,7 +59,7 @@ def main() -> int:
)
subparsers = parser.add_subparsers(title="Commands", dest="subparser")
launch_parser = subparsers.add_parser("start", aliases=["launch"])
launch_parser = subparsers.add_parser("launch", aliases=["start"])
launch_parser.add_argument("app_name", help="AppName of the game to launch",
metavar="<App Name>", action="store")
launch_parser.add_argument("--dry-run", help="Print arguments and exit", action="store_true")
@ -100,11 +100,11 @@ def main() -> int:
return 0
if args.subparser in {"login", "auth"}:
from rare.webview import launch
from rare.commands.webview import launch
return launch(args)
if args.subparser in {"start", "launch"}:
from rare.launcher import launch
if args.subparser in {"launch", "start"}:
from rare.commands.launcher import launch
return launch(args)
from rare.utils import singleton