From 4f10d8d310fd154aee2b1e21b9e2d40ab66bd20e Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Wed, 12 Apr 2023 11:49:21 +0200 Subject: [PATCH] Update check-repo.ps1 --- Scripts/check-repo.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Scripts/check-repo.ps1 b/Scripts/check-repo.ps1 index 6f7f9cff..6ab043d3 100644 --- a/Scripts/check-repo.ps1 +++ b/Scripts/check-repo.ps1 @@ -1,12 +1,12 @@ <# .SYNOPSIS - Checks a Git repository + Checks a repo .DESCRIPTION This PowerShell script verifies the integrity of a local Git repository. .PARAMETER RepoDir Specifies the path to the Git repository (current working dir by default) .EXAMPLE - PS> ./check-repo + PS> ./check-repo C:\MyRepo .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -22,10 +22,10 @@ try { & git --version if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } - Write-Host "⏳ (2/11) Checking repo path... " -noNewline + Write-Host "⏳ (2/11) Checking file path... " -noNewline $FullPath = Resolve-Path "$RepoDir" if (!(Test-Path "$FullPath" -pathType Container)) { throw "Can't access folder: $FullPath" } - "$FullPath" + "📂$FullPath" Write-Host "⏳ (3/11) Searching for 📂.git... " -noNewline if (!(Test-Path "$FullPath/.git" -pathType container)) { throw "Can't access folder: $FullPath/.git" } @@ -69,7 +69,7 @@ try { $RepoDirName = (Get-Item "$FullPath").Name [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "✔️ checked 📂$RepoDirName repo in $Elapsed sec" + "✔️ checked repo 📂$RepoDirName in $Elapsed sec" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"