mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-12 14:07:20 +02:00
Improved the scripts
This commit is contained in:
@ -8,6 +8,10 @@
|
||||
|
||||
param($Branch = "")
|
||||
|
||||
if ($Branch -eq "") {
|
||||
$Branch = read-host "Enter branch name to switch to"
|
||||
}
|
||||
|
||||
try {
|
||||
& git --version
|
||||
} catch {
|
||||
@ -16,10 +20,6 @@ try {
|
||||
}
|
||||
|
||||
try {
|
||||
if ($Branch -eq "") {
|
||||
$Branch = read-host "Enter branch name to switch to"
|
||||
}
|
||||
|
||||
& git switch --recurse-submodules $Branch
|
||||
if ($lastExitCode -ne "0") { throw "'git switch --recurse-submodules $Branch' failed" }
|
||||
|
||||
|
Reference in New Issue
Block a user