Improve the .Example section

This commit is contained in:
Markus Fleschutz
2023-08-06 21:35:36 +02:00
parent 18e4f20852
commit fa9d43b715
244 changed files with 457 additions and 433 deletions

View File

@ -18,12 +18,10 @@ try {
} else {
$Path = Resolve-Path "~/../Public"
}
if (Test-Path "$Path" -pathType container) {
Set-Location "$Path"
"📂$Path"
exit 0 # success
}
throw "Public folder at 📂$Path doesn't exist (yet)"
if (-not(Test-Path "$Path" -pathType container)) { throw "Public folder at 📂$Path doesn't exist (yet)" }
Set-Location "$Path"
"📂$Path"
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1