mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 18:27:59 -05:00
Guard parsing of CLI args in launcher, setup scripts (#2432)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
@@ -447,6 +447,7 @@ def main_menu():
|
||||
|
||||
|
||||
def main():
|
||||
args, flags_to_pass = parse_cli_args()
|
||||
if not PYTHON_OK:
|
||||
print(
|
||||
f"Python {'.'.join(map(str, MIN_PYTHON_VERSION))} is required to run Red, but you "
|
||||
@@ -473,8 +474,6 @@ def main():
|
||||
run_red(args.instancename, autorestart=args.auto_restart, cliflags=flags_to_pass)
|
||||
|
||||
|
||||
args, flags_to_pass = parse_cli_args()
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
main()
|
||||
|
||||
@@ -371,6 +371,7 @@ async def remove_instance_interaction():
|
||||
|
||||
|
||||
def main():
|
||||
args, _ = parse_cli_args()
|
||||
if args.delete:
|
||||
loop = asyncio.get_event_loop()
|
||||
loop.run_until_complete(remove_instance_interaction())
|
||||
@@ -381,8 +382,6 @@ def main():
|
||||
basic_setup()
|
||||
|
||||
|
||||
args, _ = parse_cli_args()
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user