mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-22 09:58:19 +02:00
Improve pull-repo.ps1
This commit is contained in:
parent
73c7d362da
commit
cd2bd97708
@ -17,8 +17,14 @@ try {
|
||||
if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" }
|
||||
|
||||
"🢃 Pulling updates..."
|
||||
& git pull --recurse-submodules --jobs=4
|
||||
if ($lastExitCode -ne "0") { throw "'git pull' failed" }
|
||||
$Result = (git pull --recurse-submodules --jobs=4)
|
||||
if ($lastExitCode -ne "0") {
|
||||
if ("$Result" -match "You are not currently on a branch.") {
|
||||
"NOTE: not on a branch, nothing to pull"
|
||||
} else {
|
||||
throw "'git pull' failed" }
|
||||
}
|
||||
}
|
||||
|
||||
$RepoDirName = (get-item "$RepoDir").Name
|
||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||
|
Loading…
Reference in New Issue
Block a user