mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -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:
parent
b350ac38dc
commit
ec4c325efd
@ -447,6 +447,7 @@ def main_menu():
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
args, flags_to_pass = parse_cli_args()
|
||||||
if not PYTHON_OK:
|
if not PYTHON_OK:
|
||||||
print(
|
print(
|
||||||
f"Python {'.'.join(map(str, MIN_PYTHON_VERSION))} is required to run Red, but you "
|
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)
|
run_red(args.instancename, autorestart=args.auto_restart, cliflags=flags_to_pass)
|
||||||
|
|
||||||
|
|
||||||
args, flags_to_pass = parse_cli_args()
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
try:
|
try:
|
||||||
main()
|
main()
|
||||||
|
|||||||
@ -371,6 +371,7 @@ async def remove_instance_interaction():
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
args, _ = parse_cli_args()
|
||||||
if args.delete:
|
if args.delete:
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
loop.run_until_complete(remove_instance_interaction())
|
loop.run_until_complete(remove_instance_interaction())
|
||||||
@ -381,8 +382,6 @@ def main():
|
|||||||
basic_setup()
|
basic_setup()
|
||||||
|
|
||||||
|
|
||||||
args, _ = parse_cli_args()
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
try:
|
try:
|
||||||
main()
|
main()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user