File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,13 +115,19 @@ New-Item -ItemType Directory -Path $tempDir -Force | Out-Null
115115
116116try {
117117 Write-Info " Cloning coderaft repository..."
118- git clone -- depth 1 https:// github.com / itzcozi/ coderaft.git (Join-Path $tempDir " coderaft-src" ) 2>&1 | Out-Null
119- if ($LASTEXITCODE -ne 0 ) {
118+ $srcDir = Join-Path $tempDir " coderaft-src"
119+ # Temporarily allow errors so git's stderr progress output doesn't throw
120+ $prevErrorAction = $ErrorActionPreference
121+ $ErrorActionPreference = ' Continue'
122+ $null = git clone -- depth 1 https:// github.com / itzcozi/ coderaft.git $srcDir 2>&1
123+ $cloneExitCode = $LASTEXITCODE
124+ $ErrorActionPreference = $prevErrorAction
125+ if ($cloneExitCode -ne 0 ) {
120126 Write-Err " Failed to clone repository."
121127 exit 1
122128 }
123129
124- Push-Location ( Join-Path $tempDir " coderaft-src " )
130+ Push-Location $srcDir
125131 try {
126132 Write-Info " Building coderaft..."
127133 $env: CGO_ENABLED = " 0"
You can’t perform that action at this time.
0 commit comments