mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-05-09 10:04:45 +02:00
Updated cd-repos.ps1 and cd-scripts.ps1
This commit is contained in:
parent
5873d0dc1c
commit
225a1ae902
@ -29,7 +29,7 @@ try {
|
||||
$path = Resolve-Path $path
|
||||
Set-Location "$path"
|
||||
$subfolders = Get-ChildItem $path -attributes Directory
|
||||
"📂$path entered, it has $($subfolders.Count) subfolders."
|
||||
"📂$path entered, containing $($subfolders.Count) subfolders."
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error: $($Error[0])"
|
||||
|
@ -15,8 +15,9 @@
|
||||
try {
|
||||
$path = Resolve-Path "$PSScriptRoot"
|
||||
if (-not(Test-Path "$path" -pathType container)) { throw "PowerShell scripts folder at 📂$path doesn't exist (yet)" }
|
||||
$files = Get-ChildItem $path -attributes !Directory
|
||||
"📂$path entered, containing $($files.Count) scripts."
|
||||
Set-Location "$path"
|
||||
"📂$path"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user