Skip to content

Commit b0c87ad

Browse files
author
--global
committed
don't print instructions unless proceeding
1 parent f90108b commit b0c87ad

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

.submodules/setup/__main__.py

+17-14
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,23 @@ def print_intro():
5858
"https://www.codeforlife.education/",
5959
"visit our site",
6060
)
61-
+ ".\n\n"
62-
+ "👇👀👇 "
61+
+ ".\n"
62+
)
63+
64+
answers = inquirer.prompt(
65+
[
66+
inquirer.Confirm(
67+
"proceed",
68+
message="Would you like to proceed with setting up your dev container?",
69+
)
70+
]
71+
)
72+
73+
if answers and not t.cast(bool, answers["proceed"]):
74+
sys.exit()
75+
76+
print(
77+
"👇👀👇 "
6378
+ Style.BRIGHT
6479
+ Back.YELLOW
6580
+ "PLEASE READ INSTRUCTIONS"
@@ -100,18 +115,6 @@ def print_intro():
100115
)
101116
print()
102117

103-
answers = inquirer.prompt(
104-
[
105-
inquirer.Confirm(
106-
"proceed",
107-
message="Would you like to proceed with setting up your dev container?",
108-
)
109-
]
110-
)
111-
112-
if answers and not t.cast(bool, answers["proceed"]):
113-
sys.exit()
114-
115118

116119
def print_exit(error: bool):
117120
"""Prints the exiting statement to the console.

0 commit comments

Comments
 (0)