mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-06-13 16:36:50 +02:00
Improve output of switch-branch.ps1
This commit is contained in:
parent
1a2abfaf61
commit
6406e4360b
@ -9,6 +9,7 @@ param($BranchName = "", $RepoDir = "$PWD")
|
||||
if ($BranchName -eq "") { $BranchName = read-host "Enter name of branch to switch to" }
|
||||
|
||||
try {
|
||||
$RepoDir = resolve-path "$RepoDir"
|
||||
if (-not(test-path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" }
|
||||
set-location "$RepoDir"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user