From 95a086dff73a5e791e8d935844828deb068bac29 Mon Sep 17 00:00:00 2001 From: MasterDraco Date: Wed, 5 Mar 2025 09:36:48 +0000 Subject: [PATCH] Fix input recognition in remote selection and add debug information --- install-script.sh | 3 ++- modules/dependencies-module.sh | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/install-script.sh b/install-script.sh index 3a4b651..f24dcf1 100755 --- a/install-script.sh +++ b/install-script.sh @@ -1174,7 +1174,8 @@ echo -e "Configure connection to your Transmission client:" echo read -p "Is Transmission running on a remote server? (y/n) [n]: " input_remote -if [[ $input_remote =~ ^[Yy]$ ]]; then +# Explicitly check for "y" or "Y" response +if [[ "$input_remote" == "y" ]] || [[ "$input_remote" == "Y" ]]; then export TRANSMISSION_REMOTE=true echo -e "${GREEN}Remote Transmission selected.${NC}" else diff --git a/modules/dependencies-module.sh b/modules/dependencies-module.sh index 8369385..6226d9d 100644 --- a/modules/dependencies-module.sh +++ b/modules/dependencies-module.sh @@ -10,13 +10,24 @@ function install_dependencies() { # Try relative path first ENV_FILE="$(dirname "$(dirname "$0")")/.env.install" + + # Debug information to help trace the issue + log "INFO" "Debug: ENV_FILE path is: $ENV_FILE" if [ -f "$ENV_FILE" ]; then + log "INFO" "Debug: Env file content before sourcing:" + cat "$ENV_FILE" | while read line; do log "INFO" "Debug: $line"; done + source "$ENV_FILE" log "INFO" "Loaded transmission settings from environment file: TRANSMISSION_REMOTE=$TRANSMISSION_REMOTE" # Try absolute path as fallback elif [ -f "/opt/develop/transmission-rss-manager/.env.install" ]; then + log "INFO" "Debug: Using absolute path instead. Content:" + cat "/opt/develop/transmission-rss-manager/.env.install" | while read line; do log "INFO" "Debug: $line"; done + source "/opt/develop/transmission-rss-manager/.env.install" log "INFO" "Loaded transmission settings from absolute path: TRANSMISSION_REMOTE=$TRANSMISSION_REMOTE" + else + log "WARN" "Debug: No env file found at either location" fi # Always prompt if we didn't get TRANSMISSION_REMOTE from environment or previous steps