From c009dd521dbfac9e8932859c7554e414b2adf329 Mon Sep 17 00:00:00 2001 From: Mustafa Baser Date: Wed, 23 Feb 2022 17:58:15 +0300 Subject: [PATCH] fix(jans-linux-setup): uninstall does not prompt with -n (#887) --- jans-linux-setup/jans_setup/install.py | 29 +++++++++++++------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/jans-linux-setup/jans_setup/install.py b/jans-linux-setup/jans_setup/install.py index e9050b9fc00..90a502134ba 100755 --- a/jans-linux-setup/jans_setup/install.py +++ b/jans-linux-setup/jans_setup/install.py @@ -316,22 +316,23 @@ def prepare_jans_cli_package(): def uninstall_jans(): check_installation() - print('\033[31m') - print("This process is irreversible.") - print("You will lose all data related to Janssen Server.") - print('\033[0m') - print() - while True: - print('\033[31m \033[1m') - response = input("Are you sure to uninstall Janssen Server? [yes/N] ") + if not argsp.n: + print('\033[31m') + print("This process is irreversible.") + print("You will lose all data related to Janssen Server.") print('\033[0m') - if response.lower() in ('yes', 'n', 'no'): - if not response.lower() == 'yes': - sys.exit() + print() + while True: + print('\033[31m \033[1m') + response = input("Are you sure to uninstall Janssen Server? [yes/N] ") + print('\033[0m') + if response.lower() in ('yes', 'n', 'no'): + if not response.lower() == 'yes': + sys.exit() + else: + break else: - break - else: - print("Please type \033[1m yes \033[0m to uninstall") + print("Please type \033[1m yes \033[0m to uninstall") print("Uninstalling Jannsen Server...") for service in jetty_services: