From 1a2abfaf619c48e69c38c1be0aa9198fdf47403b Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Thu, 22 Apr 2021 09:47:48 +0200 Subject: [PATCH] Improve output of switch-branch.ps1 --- Scripts/switch-branch.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Scripts/switch-branch.ps1 b/Scripts/switch-branch.ps1 index 72f4df09..e242940f 100755 --- a/Scripts/switch-branch.ps1 +++ b/Scripts/switch-branch.ps1 @@ -17,7 +17,7 @@ try { $Result = (git status) if ($lastExitCode -ne "0") { throw "'git status' failed in $RepoDir" } - if ("$Result" -notmatch "nothing to commit, working tree clean") { throw "Repository is NOT clean: $Result" } + if ("$Result" -notmatch "nothing to commit, working tree clean") { throw "Git repository is NOT clean: $Result" } & "$PSScriptRoot/fetch-repo.ps1" if ($lastExitCode -ne "0") { throw "Script 'fetch-repo.ps1' failed" } @@ -31,6 +31,7 @@ try { & git pull --recurse-submodules if ($lastExitCode -ne "0") { throw "'git pull' failed" } + "✔️switched Git repository 📂$RepoDir to branch 🌵$BranchName" exit 0 } catch { write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"