33import subprocess
44import sys
55
6+ import click
7+
68from arm_cli .system .shell_scripts import detect_shell , get_current_shell_addins
79
810
@@ -26,12 +28,7 @@ def setup_xhost(force=False):
2628 # Ensure xhost allows local Docker connections
2729 print ("Setting up X11 access for Docker containers..." )
2830 if not force :
29- response = (
30- input ("Do you want to configure X11 access for Docker containers? (y/N): " )
31- .strip ()
32- .lower ()
33- )
34- if response not in ["y" , "yes" ]:
31+ if not click .confirm ("Do you want to configure X11 access for Docker containers?" ):
3532 print ("X11 setup cancelled." )
3633 return
3734
@@ -102,8 +99,7 @@ def setup_data_directories(force=False):
10299 print ("And set appropriate ownership and permissions." )
103100
104101 if not force :
105- response = input ("Do you want to proceed? (y/N): " ).strip ().lower ()
106- if response not in ["y" , "yes" ]:
102+ if not click .confirm ("Do you want to proceed?" ):
107103 print ("Setup cancelled." )
108104 return False
109105
@@ -156,12 +152,7 @@ def setup_shell(force=False):
156152 if not is_line_in_file (line , bashrc_path ):
157153 print (f'Adding \n "{ line } "\n to { bashrc_path } ' )
158154 if not force :
159- response = (
160- input ("Do you want to add shell autocomplete to ~/.bashrc? (y/N): " )
161- .strip ()
162- .lower ()
163- )
164- if response not in ["y" , "yes" ]:
155+ if not click .confirm ("Do you want to add shell autocomplete to ~/.bashrc?" ):
165156 print ("Shell setup cancelled." )
166157 return
167158
0 commit comments