mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-09 13:04:59 +02:00
Improve the scripts
This commit is contained in:
@ -9,16 +9,17 @@
|
||||
param($RepoDir = "$PWD")
|
||||
|
||||
try {
|
||||
"Fetching updates for Git repository $RepoDir ..."
|
||||
"Fetching updates for Git repository $($RepoDir)..."
|
||||
|
||||
if (-not(test-path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" }
|
||||
set-location "$RepoDir"
|
||||
|
||||
& git fetch --all --recurse-submodules --jobs=4
|
||||
if ($lastExitCode -ne "0") { # retry once:
|
||||
if ($lastExitCode -ne "0") {
|
||||
# retry once:
|
||||
start-sleep -milliseconds 1000
|
||||
& git fetch --all --recurse-submodules --jobs=1
|
||||
if ($lastExitCode -ne "0") { throw "'git fetch' failed" }
|
||||
if ($lastExitCode -ne "0") { throw "'git fetch' failed (twice)" }
|
||||
}
|
||||
exit 0
|
||||
} catch {
|
||||
|
Reference in New Issue
Block a user