@@ -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 < /dev/tty
73+ read -p " $( echo -e ${YELLOW} Update scripts? [Y/n]:${NC} ) " -n 1 -r
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
@@ -152,6 +152,11 @@ print_manual_run() {
152152}
153153
154154main () {
155+ # Redirect stdin to /dev/tty if running through pipe (curl | bash)
156+ if [ ! -t 0 ]; then
157+ exec < /dev/tty
158+ fi
159+
155160 clear
156161 print_header
157162
@@ -173,7 +178,7 @@ main() {
173178
174179 echo
175180
176- read -p " $( echo -e ${GREEN}${BOLD} Run script now? [Y/n]:${NC} ) " -n 1 -r < /dev/tty
181+ read -p " $( echo -e ${GREEN}${BOLD} Run script now? [Y/n]:${NC} ) " -n 1 -r
177182 echo
178183 echo
179184
@@ -201,4 +206,4 @@ main() {
201206 fi
202207}
203208
204- main
209+ main
0 commit comments