Fix configuration gathering and order of operations

- Add emergency fallback to ask about remote Transmission if config step was skipped
- Add CONFIG_GATHERED flag to track if config step was run
- Improve bootstrap installer with clear explanation of what to expect
- Explicitly check for gather_configuration success and output debug info
- Add additional variable initialization to ensure consistent behavior

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-03-05 08:46:06 +00:00
parent e05c8da811
commit d2babeba27
4 changed files with 45 additions and 2 deletions

View File

@@ -78,6 +78,9 @@ function gather_configuration() {
# Initialize default values for Transmission mode
export TRANSMISSION_REMOTE=false
# Set flag to indicate that configuration was gathered
export CONFIG_GATHERED=true
echo -e "${BOLD}Installation Configuration:${NC}"
echo -e "Please provide the following configuration parameters:"
echo

View File

@@ -12,6 +12,24 @@ function install_dependencies() {
fi
log "INFO" "Transmission mode: $([ "$TRANSMISSION_REMOTE" = true ] && echo "Remote" || echo "Local")"
# Debug: print out whether the gather_configuration was called
if [ "$IS_UPDATE" != true ]; then
if [ -z "$CONFIG_GATHERED" ]; then
log "ERROR" "Configuration step was skipped! This is a bug."
log "INFO" "Please report this issue. Will now manually ask about Transmission location."
# Emergency fix: Ask about remote installation here
read -p "Is Transmission running on a remote server? (y/n) [n]: " input_remote
if [[ $input_remote =~ ^[Yy]$ ]]; then
export TRANSMISSION_REMOTE=true
log "INFO" "Remote Transmission selected."
else
export TRANSMISSION_REMOTE=false
log "INFO" "Local Transmission selected."
fi
fi
fi
# Check for package manager
if command -v apt-get &> /dev/null; then