File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed
Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 4040 - name : First test
4141 run : |
4242 nafas --version --color="red" --bg-color="blue" --intensity="bright"
43- nafas --generate-config="test.json" --skip-intro
43+ nafas --generate-config="test.json"
4444 - name : Install dev-requirements
4545 run : |
4646 python otherfiles/requirements-splitter.py
Original file line number Diff line number Diff line change @@ -51,6 +51,13 @@ def run(args: argparse.Namespace) -> None:
5151 silent_flag = args .silent
5252 if args .version :
5353 print (NAFAS_VERSION )
54+ elif args .generate_config :
55+ result = generate_config (args .generate_config )
56+ if not result :
57+ print (CONFIG_GENERATE_ERROR_MESSAGE )
58+ else :
59+ print (CONFIG_GENERATE_SUCCESS_MESSAGE )
60+ sys .exit ()
5461 else :
5562 clear_screen ()
5663 if not args .skip_intro :
@@ -60,15 +67,8 @@ def run(args: argparse.Namespace) -> None:
6067 tprint ("Silent Mode" )
6168 print_nafas_description ()
6269 _ = input ("Press any key to continue.\n " )
63- EXIT_FLAG = False
64- if args .generate_config :
65- result = generate_config (args .generate_config )
66- if not result :
67- print (CONFIG_GENERATE_ERROR_MESSAGE )
68- else :
69- print (CONFIG_GENERATE_SUCCESS_MESSAGE )
70- sys .exit ()
71- while not EXIT_FLAG :
70+ exit_flag = False
71+ while not exit_flag :
7272 if args .config :
7373 result = load_config (args .config )
7474 if result ["status" ]:
@@ -93,7 +93,7 @@ def run(args: argparse.Namespace) -> None:
9393 INPUTINDEX = str (
9494 input ("Press [R] to restart or any other key to exit." ))
9595 if INPUTINDEX .upper () != "R" :
96- EXIT_FLAG = True
96+ exit_flag = True
9797 print (EXIT_MESSAGE )
9898 else :
9999 clear_screen ()
You can’t perform that action at this time.
0 commit comments