Skip to content

Commit

Permalink
fix(jans-linux-setup): uninstall does not prompt with -n (#887)
Browse files Browse the repository at this point in the history
  • Loading branch information
devrimyatar authored Feb 23, 2022
1 parent e81006b commit c009dd5
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions jans-linux-setup/jans_setup/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c009dd5

Please sign in to comment.