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

@@ -99,6 +99,9 @@ trap 'cleanup_on_error "$BASH_COMMAND"' ERR
# Execute the installation steps in sequence
log "INFO" "Starting installation process..."
# Set default for TRANSMISSION_REMOTE
export TRANSMISSION_REMOTE=false
if [ "$IS_UPDATE" = true ]; then
log "INFO" "Running in update mode - preserving existing configuration..."
@@ -132,10 +135,16 @@ else
# Step 1: Gather configuration from user
log "INFO" "Gathering configuration..."
gather_configuration || {
# Explicitly run this to ensure it's called before dependencies
set +e # Temporarily disable exit on error
if ! gather_configuration; then
log "ERROR" "Configuration gathering failed"
exit 1
}
fi
set -e # Re-enable exit on error
# Debug: Verify TRANSMISSION_REMOTE is set
log "INFO" "After configuration gathering, TRANSMISSION_REMOTE=$TRANSMISSION_REMOTE"
# Step 2: Install dependencies
log "INFO" "Installing dependencies..."