From f0d82b8342e51c4edcad2b0c097c6b7fa14b0e5a Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Tue, 8 Jun 2021 13:51:56 +0200 Subject: [PATCH] Improve pull-repo.ps1 --- Scripts/pull-repo.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Scripts/pull-repo.ps1 b/Scripts/pull-repo.ps1 index 069990dd..dddba146 100755 --- a/Scripts/pull-repo.ps1 +++ b/Scripts/pull-repo.ps1 @@ -18,16 +18,16 @@ try { $Result = (git status) if ("$Result" -match "HEAD detached at ") { - write-warning "Not on a branch, so nothing to pull (in detached head state)" + write-warning "Not on a branch, so nothing to pull (in detached HEAD state)" } else { "🢃 Pulling updates..." & git pull --recurse-submodules --jobs=4 if ($lastExitCode -ne "0") { throw "'git pull' failed" } - } - $RepoDirName = (get-item "$RepoDir").Name - [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "✔️ pulled updates for Git repository 📂$RepoDirName in $Elapsed sec" + $RepoDirName = (get-item "$RepoDir").Name + [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds + "✔️ pulled updates for Git repository 📂$RepoDirName in $Elapsed sec" + } exit 0 } catch { write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"