From 6c82e0cf6f23286ade429c1ee061568a25ebd717 Mon Sep 17 00:00:00 2001 From: Colton Loftus <70598503+C-Loftus@users.noreply.github.com> Date: Tue, 10 Dec 2024 10:50:21 -0500 Subject: [PATCH] tty change --- main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 4856183e..9c466a25 100644 --- a/main.py +++ b/main.py @@ -40,13 +40,15 @@ def up(local: bool, debug: bool): """Run the docker swarm stack""" if not os.path.exists(".env"): - print("Missing .env file. Do you want to copy .env.example to .env ? (y/n)") # check if you are running in a terminal or in CI/CD if not sys.stdin.isatty(): shutil.copy(".env.example", ".env") else: - answer = input().lower() + answer = input( + "Missing .env file. Do you want to copy .env.example to .env ? (y/n)" + ).lower() if answer == "y" or answer == "yes": + print("Copying .env.example to .env") shutil.copy(".env.example", ".env") else: print("Missing .env file. Exiting")