File tree Expand file tree Collapse file tree 1 file changed +27
-2
lines changed
Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -1454,8 +1454,33 @@ verbose "Using built-in WebSocket monitor (no external dependency)"
14541454# Install Cosmovisor for automatic upgrades (pinned to v1.7.1)
14551455step " Installing Cosmovisor for automatic upgrades"
14561456if ! command -v cosmovisor > /dev/null 2>&1 ; then
1457- go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.7.1 < /dev/null
1458- ok " Cosmovisor v1.7.1 installed"
1457+ COSMOVISOR_LOG=$( mktemp /tmp/cosmovisor-install-XXXXXX.log)
1458+ go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.7.1 < /dev/null > " $COSMOVISOR_LOG " 2>&1 &
1459+ GO_PID=$!
1460+ # Show spinner while go install runs
1461+ if [[ -t 1 ]]; then
1462+ spin_chars=' ⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏'
1463+ i=0
1464+ while kill -0 " $GO_PID " 2> /dev/null; do
1465+ printf " \r %s Building cosmovisor from source..." " ${spin_chars: i++% ${# spin_chars} : 1} "
1466+ sleep 0.1 2> /dev/null || sleep 1
1467+ done
1468+ printf " \r\033[K"
1469+ else
1470+ # Non-TTY: just wait silently
1471+ wait " $GO_PID "
1472+ fi
1473+ wait " $GO_PID " 2> /dev/null
1474+ GO_EXIT=$?
1475+ if [[ $GO_EXIT -eq 0 ]]; then
1476+ rm -f " $COSMOVISOR_LOG "
1477+ # Ensure go bin directory is in PATH for current session
1478+ export PATH=" ${GOBIN:- ${GOPATH:- $HOME / go} / bin} :$PATH "
1479+ ok " Cosmovisor v1.7.1 installed"
1480+ else
1481+ err " Cosmovisor installation failed (see $COSMOVISOR_LOG )"
1482+ exit 1
1483+ fi
14591484else
14601485 ok " Cosmovisor already installed"
14611486fi
You can’t perform that action at this time.
0 commit comments