Skip to content

Commit

Permalink
Adding support for local-check-runner utility.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmichaels-harvard committed Jul 17, 2023
1 parent 485bdf7 commit 0fbbc50
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions foursight_core/scripts/local_check_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ def parse_args():
exit(1)

if not args.env:
print("Must specified an AWS environment name via --env option.")
print("An AWS environment name is required; use the --env option.")
env = guess_env()
if env:
confirm_interactively(f"Do you want to use: {env}?", exit_if_no=True)
confirm_interactively(f"Do you want to use this AWS environment name: {env}?", exit_if_no=True)
args.env = env
else:
exit_with_no_action()

return args

Expand Down Expand Up @@ -153,6 +155,9 @@ def confirm_interactively(message: str, exit_if_no: bool = False) -> bool:
if yes_or_no(message):
return True
if exit_if_no:
print("Exiting with no action.")
exit(0)
exit_with_no_action()
return False

def exit_with_no_action():
print("Exiting with no action.")
exit(0)

0 comments on commit 0fbbc50

Please sign in to comment.