From 5873d0dc1c7e1877445d6303cb8672b6dc9d47e0 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Mon, 17 Mar 2025 10:30:22 +0100 Subject: [PATCH] Updated cd-repos.ps1 --- scripts/cd-repos.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/cd-repos.ps1 b/scripts/cd-repos.ps1 index 5430557b..4a2845db 100755 --- a/scripts/cd-repos.ps1 +++ b/scripts/cd-repos.ps1 @@ -1,6 +1,6 @@ <# .SYNOPSIS - Sets the working directory to the Git repos folder + Sets the working dir to the repos folder .DESCRIPTION This PowerShell script changes the working directory to the folder for Git repositories. .EXAMPLE @@ -24,11 +24,12 @@ try { } elseif (Test-Path "~/source/repos" -pathType container) { $path = "~/source/repos" # Visual Studio default } elseif (Test-Path "D:/Repos" -pathType container) { $path = "D:/Repos" # second HDD } else { - throw "No folder for Git repositories yet (in home or root directory)" + throw "No folder found for Git repositories (in home or root directory) - Please create one." } $path = Resolve-Path $path Set-Location "$path" - "📂$path" + $subfolders = Get-ChildItem $path -attributes Directory + "📂$path entered, it has $($subfolders.Count) subfolders." exit 0 # success } catch { "⚠️ Error: $($Error[0])"