mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
fix: Improve error handling and diagnostics in install-remote.sh
Enhanced the extract_repository function to properly capture and display unzip error messages, helping diagnose extraction failures during remote installation. Changes: - Capture unzip output in variable for better error reporting - Display detailed error messages when extraction fails - Improve ZIP integrity test error handling 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -138,7 +138,8 @@ function extract_repository() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Try to extract
|
# Try to extract
|
||||||
if unzip -q "$zip_path" -d "$temp_dir" 2>&1; then
|
local unzip_output
|
||||||
|
if unzip_output=$(unzip -q "$zip_path" -d "$temp_dir" 2>&1); then
|
||||||
# Find the extracted directory (usually repo-name-branch)
|
# Find the extracted directory (usually repo-name-branch)
|
||||||
local repo_dir
|
local repo_dir
|
||||||
repo_dir=$(find "$temp_dir" -maxdepth 1 -type d -name "Claude-Code-Workflow-*" | head -n 1)
|
repo_dir=$(find "$temp_dir" -maxdepth 1 -type d -name "Claude-Code-Workflow-*" | head -n 1)
|
||||||
@@ -155,8 +156,13 @@ function extract_repository() {
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
write_color "Extraction failed" "$COLOR_ERROR"
|
write_color "Extraction failed" "$COLOR_ERROR"
|
||||||
|
if [ -n "$unzip_output" ]; then
|
||||||
|
write_color "Error details: $unzip_output" "$COLOR_ERROR"
|
||||||
|
fi
|
||||||
write_color "Testing zip file integrity..." "$COLOR_INFO"
|
write_color "Testing zip file integrity..." "$COLOR_INFO"
|
||||||
unzip -t "$zip_path"
|
if ! unzip -t "$zip_path" 2>&1; then
|
||||||
|
write_color "ZIP file is corrupted" "$COLOR_ERROR"
|
||||||
|
fi
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user