Fix code consistency and reliability issues
This commit addresses multiple code consistency and reliability issues across the codebase: 1. Version consistency - use package.json version (2.0.9) throughout 2. Improved module loading with better error handling and consistent symlinks 3. Enhanced data directory handling with better error checking 4. Fixed redundant code in main-installer.sh 5. Improved error handling in transmission-client.js 6. Added extensive module symlink creation 7. Better file path handling and permission checks 8. Enhanced API response handling 💡 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -401,8 +401,14 @@ fi
|
||||
# Step 7: Set up update script
|
||||
log "INFO" "Setting up update script..."
|
||||
mkdir -p "${SCRIPT_DIR}/scripts"
|
||||
cp "${SCRIPT_DIR}/scripts/update.sh" "${SCRIPT_DIR}/scripts/update.sh" 2>/dev/null || {
|
||||
# If copy fails, it probably doesn't exist, so we'll create it
|
||||
# Check if update script exists - don't copy it to itself
|
||||
if [ ! -f "${SCRIPT_DIR}/scripts/update.sh" ]; then
|
||||
# First, check if we have an update script to copy
|
||||
if [ -f "${SCRIPT_DIR}/update.sh" ]; then
|
||||
cp "${SCRIPT_DIR}/update.sh" "${SCRIPT_DIR}/scripts/update.sh"
|
||||
log "INFO" "Copied update script from root to scripts directory"
|
||||
else
|
||||
# Create the update script since it doesn't exist
|
||||
cat > "${SCRIPT_DIR}/scripts/update.sh" << 'EOL'
|
||||
#!/bin/bash
|
||||
|
||||
@@ -491,6 +497,8 @@ echo -e "Changes will take effect immediately."
|
||||
EOL
|
||||
|
||||
chmod +x "${SCRIPT_DIR}/scripts/update.sh"
|
||||
log "INFO" "Created update script: ${SCRIPT_DIR}/scripts/update.sh"
|
||||
fi
|
||||
}
|
||||
|
||||
# Step 8: Final setup and permissions
|
||||
|
||||
Reference in New Issue
Block a user