From 1bac6c3f2a42bc262ac95078bc9c56f591b91a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferit=20Yi=C4=9Fit=20BALABAN?= Date: Fri, 10 Feb 2023 22:33:28 +0300 Subject: [PATCH] Implement no local repository logic --- dotman.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/dotman.py b/dotman.py index 4f13a9f..9b58854 100755 --- a/dotman.py +++ b/dotman.py @@ -236,13 +236,14 @@ def main(): # 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 flag_interactive: - # ask for deploy - return - elif flag_deploy: - # deploy - return - quit(0) - + print(f"local repository directory for {SETTINGS.SHN_REPO} does not exist") + print("You can clone and deploy this repository to local config directory") + ans = input("Continue (y/N): ").lower() + if ans == "n" and not ans == "y": + exit(0) + if not flag_interactive and not flag_deploy: + exit(0) + # run deploy # ^^^ new logic ^^^ #