diff --git a/lib/steps/repos.sh b/lib/steps/repos.sh index 3c35917..2f3833b 100644 --- a/lib/steps/repos.sh +++ b/lib/steps/repos.sh @@ -28,17 +28,23 @@ _clone_repos() { fi start_spinner "Cloning ${name} (branch: ${branch})..." - if git clone --branch "$branch" "$url" "$dest" 2>&1 | grep -q "fatal\|error"; then + + local clone_log="/tmp/clone_${name}_$$.log" + if ! git clone --branch "$branch" "$url" "$dest" > "$clone_log" 2>&1; then stop_spinner log_error "git clone failed: ${url}" + cat "$clone_log" + rm -f "$clone_log" exit 1 fi + rm -f "$clone_log" + stop_spinner "${name} cloned → ${dest}" chmod 700 "$dest" done if [ ! -d "$HV_CORE/.git" ]; then - log_error "core repository not cloned successfully" + log_error "core repository not cloned" exit 1 fi }