Skip to content

Commit

Permalink
don't print instructions unless proceeding
Browse files Browse the repository at this point in the history
  • Loading branch information
--global committed Oct 23, 2024
1 parent f90108b commit b0c87ad
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions .submodules/setup/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,23 @@ def print_intro():
"https://www.codeforlife.education/",
"visit our site",
)
+ ".\n\n"
+ "πŸ‘‡πŸ‘€πŸ‘‡ "
+ ".\n"
)

answers = inquirer.prompt(
[
inquirer.Confirm(
"proceed",
message="Would you like to proceed with setting up your dev container?",
)
]
)

if answers and not t.cast(bool, answers["proceed"]):
sys.exit()

print(
"πŸ‘‡πŸ‘€πŸ‘‡ "
+ Style.BRIGHT
+ Back.YELLOW
+ "PLEASE READ INSTRUCTIONS"
Expand Down Expand Up @@ -100,18 +115,6 @@ def print_intro():
)
print()

answers = inquirer.prompt(
[
inquirer.Confirm(
"proceed",
message="Would you like to proceed with setting up your dev container?",
)
]
)

if answers and not t.cast(bool, answers["proceed"]):
sys.exit()


def print_exit(error: bool):
"""Prints the exiting statement to the console.
Expand Down

0 comments on commit b0c87ad

Please sign in to comment.