Implement no local repository logic

This commit is contained in:
Ferit Yiğit BALABAN 2023-02-10 22:33:28 +03:00
parent 90870ead8d
commit 1bac6c3f2a

View File

@ -236,13 +236,14 @@ def main():
# local repository directory does not exist. Only deploy is possible. # local repository directory does not exist. Only deploy is possible.
# if interactive, ask for deploy, else if deploy flag is set, deploy, otherwise quit. # if interactive, ask for deploy, else if deploy flag is set, deploy, otherwise quit.
if flag_interactive: if flag_interactive:
# ask for deploy print(f"local repository directory for {SETTINGS.SHN_REPO} does not exist")
return print("You can clone and deploy this repository to local config directory")
elif flag_deploy: ans = input("Continue (y/N): ").lower()
# deploy if ans == "n" and not ans == "y":
return exit(0)
quit(0) if not flag_interactive and not flag_deploy:
exit(0)
# run deploy
# ^^^ new logic ^^^ # ^^^ new logic ^^^
# #