@@ -70,17 +70,17 @@ install_uv() {
7070setup_repository () {
7171 if [ -d " $INSTALL_DIR " ]; then
7272 print_info " Repository already exists at $INSTALL_DIR "
73- read -p " $( echo -e ${YELLOW} Update scripts? [Y/n]:${NC} ) " -n 1 -r
73+ read -p " $( echo -e ${YELLOW} Update scripts? [Y/n]:${NC} ) " -n 1 -r < /dev/tty
7474 echo
75-
75+
7676 if [[ $REPLY =~ ^[Nn]$ ]]; then
7777 print_info " Skipping update, using existing version"
7878 return 0
7979 fi
80-
80+
8181 print_step " Updating repository..."
8282 cd " $INSTALL_DIR "
83-
83+
8484 if git pull origin master < /dev/null; then
8585 print_success " Repository updated successfully"
8686 return 0
@@ -90,12 +90,12 @@ setup_repository() {
9090 fi
9191 else
9292 print_step " Cloning repository..."
93-
93+
9494 if ! check_command git; then
9595 print_error " Git is not installed. Please install git and try again"
9696 exit 1
9797 fi
98-
98+
9999 if git clone " $REPO_URL " " $INSTALL_DIR " < /dev/null; then
100100 print_success " Repository cloned to $INSTALL_DIR "
101101 return 0
@@ -108,9 +108,9 @@ setup_repository() {
108108
109109install_dependencies () {
110110 print_step " Installing dependencies..."
111-
111+
112112 cd " $INSTALL_DIR "
113-
113+
114114 if uv sync < /dev/null; then
115115 print_success " Dependencies installed successfully"
116116 return 0
@@ -122,9 +122,9 @@ install_dependencies() {
122122
123123run_script () {
124124 print_step " Running script..."
125-
125+
126126 cd " $INSTALL_DIR "
127-
127+
128128 if uv run main.py; then
129129 print_success " Script executed successfully"
130130 return 0
@@ -173,7 +173,7 @@ main() {
173173
174174 echo
175175
176- read -p " $( echo -e ${GREEN}${BOLD} Run script now? [Y/n]:${NC} ) " -n 1 -r
176+ read -p " $( echo -e ${GREEN}${BOLD} Run script now? [Y/n]:${NC} ) " -n 1 -r < /dev/tty
177177 echo
178178 echo
179179
@@ -201,4 +201,4 @@ main() {
201201 fi
202202}
203203
204- main
204+ main
0 commit comments