From 8a9639ab6f110659df2fa424957c623e6e3827cf Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Thu, 6 Apr 2023 09:45:48 +0200 Subject: [PATCH] Update clean-repo.ps1 --- Scripts/clean-repo.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Scripts/clean-repo.ps1 b/Scripts/clean-repo.ps1 index 2a654fe7..ec892a9c 100755 --- a/Scripts/clean-repo.ps1 +++ b/Scripts/clean-repo.ps1 @@ -19,14 +19,14 @@ param([string]$RepoDir = "$PWD") try { $StopWatch = [system.diagnostics.stopwatch]::startNew() - "⏳ (1/4) Checking path to repository... 📂$RepoDir" - if (-not(Test-Path "$RepoDir" -pathType container)) { throw "Can't access folder '$RepoDir' - maybe a typo or missing folder permissions?" } - $RepoDirName = (Get-Item "$RepoDir").Name - - Write-Host "⏳ (2/4) Searching for Git executable... " -noNewline + Write-Host "⏳ (1/4) Searching for Git executable... " -noNewline & git --version if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } + "⏳ (2/4) Checking repository... 📂$RepoDir" + if (-not(Test-Path "$RepoDir" -pathType container)) { throw "Can't access folder '$RepoDir' - maybe a typo or missing folder permissions?" } + $RepoDirName = (Get-Item "$RepoDir").Name + "⏳ (3/4) Removing untracked files in the repository..." & git -C "$RepoDir" clean -xfd -f # to delete all untracked files in the main repo if ($lastExitCode -ne "0") {