From 2c026ee81e950607f59c151e5b8b77c733b094fc Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Sun, 4 Dec 2022 11:44:20 +0100 Subject: [PATCH] Update fetch-repo.ps1 --- Scripts/fetch-repo.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Scripts/fetch-repo.ps1 b/Scripts/fetch-repo.ps1 index d82d1eda..98e77f74 100755 --- a/Scripts/fetch-repo.ps1 +++ b/Scripts/fetch-repo.ps1 @@ -10,7 +10,7 @@ ⏳ (1/3) Searching for Git executable... git version 2.38.1.windows.1 ⏳ (2/3) Checking Git repository 📂PowerShell... ⏳ (3/3) Fetching updates (including submodules)... - ✔️ fetched updates for Git repository 📂PowerShell in 2 sec. + ✔️ fetched updates for 📂PowerShell repository in 2 sec. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -27,15 +27,15 @@ try { if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } $RepoDirName = (Get-Item "$RepoDir").Name - "⏳ (2/3) Checking Git repository 📂$RepoDirName... " + Write-Host "⏳ (2/3) Checking Git repository... 📂$RepoDirName" if (!(Test-Path "$RepoDir" -pathType container)) { throw "Can't access folder: $RepoDir" } - "⏳ (3/3) Fetching updates (including submodules)... " + Write-Host "⏳ (3/3) Fetching updates... " & git -C "$RepoDir" fetch --all --recurse-submodules --prune --prune-tags --force if ($lastExitCode -ne "0") { throw "'git fetch' failed with exit code $lastExitCode" } [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "✔️ fetched updates for Git repository 📂$RepoDirName in $Elapsed sec." + "✔️ fetched updates for 📂$RepoDirName repository in $Elapsed sec." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"