Skip to content

Commit

Permalink
check for ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Loftus committed Nov 28, 2024
1 parent e0b51ac commit 3061c7d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ def up(local: bool, debug: bool):

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():
print("y")
shutil.copy(".env.example", ".env")
return
answer = input().lower()
if answer == "y" or answer == "yes":
shutil.copy(".env.example", ".env")
Expand Down

0 comments on commit 3061c7d

Please sign in to comment.