Skip to content

Commit cb84fb1

Browse files
committed
fix: installer was not lauching repair mode when lauched from wget
1 parent 9cb3eb4 commit cb84fb1

File tree

1 file changed

+22
-15
lines changed

1 file changed

+22
-15
lines changed

docs/linux/installer.sh

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -543,21 +543,28 @@ install() {
543543
# Check if the application is already installed
544544
if [ -f "$LINK_DIR/$SCRIPT_NAME" ] || [ -d "$INSTALL_DIR" ]; then
545545
echo -e "${YELLOW}Phoenix Code appears to be already installed.${RESET}"
546-
547-
# Simplified prompt for reinstall without detailed explanation
548-
read -r -p "Would you like to reinstall it? (y/N): " response
549-
case "$response" in
550-
[Yy]* )
551-
echo -e "${GREEN}Reinstalling Phoenix Code...${RESET}"
552-
uninstall
553-
downloadAndInstall
554-
copyFilesToDestination
555-
;;
556-
* )
557-
echo -e "${RED}Reinstall aborted by the user.${RESET}"
558-
exit 0
559-
;;
560-
esac
546+
# Checking if the shell has a controlling terminal if its non interactive reinstall phoenix with latest version
547+
if [ ! -t 0 ]; then
548+
echo -e "${GREEN}Reinstalling Phoenix Code...${RESET}"
549+
uninstall
550+
downloadAndInstall
551+
copyFilesToDestination
552+
else
553+
# Simplified prompt for reinstall without detailed explanation
554+
read -r -p "Would you like to reinstall it? (y/N): " response
555+
case "$response" in
556+
[Yy]* )
557+
echo -e "${GREEN}Reinstalling Phoenix Code...${RESET}"
558+
uninstall
559+
downloadAndInstall
560+
copyFilesToDestination
561+
;;
562+
* )
563+
echo -e "${RED}Reinstall aborted by the user.${RESET}"
564+
exit 0
565+
;;
566+
esac
567+
fi
561568
else
562569
downloadAndInstall
563570
copyFilesToDestination

0 commit comments

Comments
 (0)