From 4493e2604cfaaac67a702dabadfe5aaf53a0943a Mon Sep 17 00:00:00 2001 From: Hengdong Gong Date: Wed, 10 Sep 2025 11:23:39 +0800 Subject: [PATCH] add progressive bar to indicate dowload progress (#514) Add progressive bar to indicate dowload progress, show the origin git clone tips. --- scripts/install | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index a039c27..62e3176 100755 --- a/scripts/install +++ b/scripts/install @@ -59,8 +59,10 @@ download_source() { GO_CACHE_PATH=$GVM_ROOT/archive/go [[ -d $GO_CACHE_PATH ]] && return display_message "Downloading Go source..." - git clone "$GO_SOURCE_URL" "$GO_CACHE_PATH" >> "$GVM_ROOT/logs/go-download.log" 2>&1 || - display_fatal "Couldn't download Go source. Check the logs $GVM_ROOT/logs/go-download.log" + git clone --progress "$GO_SOURCE_URL" "$GO_CACHE_PATH" 2>&1 | tee "$GVM_ROOT/logs/go-download.log" + if [[ ${PIPESTATUS[0]} -ne 0 ]]; then + display_fatal "Couldn't download Go source. Check the logs: $GVM_ROOT/logs/go-download.log" + fi } check_tag() {