mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-10 21:33:47 +02:00
Updated cd-repos.ps1 and cd-scripts.ps1
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
This PowerShell script changes the working directory to the PowerShell scripts folder.
|
||||
.EXAMPLE
|
||||
PS> ./cd-scripts
|
||||
📂C:\Users\Markus\source\repos\PowerShell\scripts
|
||||
📂C:\Users\Markus\Repos\PowerShell\scripts
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
@ -13,10 +13,10 @@
|
||||
#>
|
||||
|
||||
try {
|
||||
$Path = Resolve-Path "$PSScriptRoot"
|
||||
if (-not(Test-Path "$Path" -pathType container)) { throw "PowerShell scripts folder at 📂$Path doesn't exist (yet)" }
|
||||
Set-Location "$Path"
|
||||
"📂$Path"
|
||||
$path = Resolve-Path "$PSScriptRoot"
|
||||
if (-not(Test-Path "$path" -pathType container)) { throw "PowerShell scripts folder at 📂$path doesn't exist (yet)" }
|
||||
Set-Location "$path"
|
||||
"📂$path"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Reference in New Issue
Block a user