Fix order of if/elseif in posh-venv.
This commit is contained in:
parent
cb4291d6d8
commit
6a9c4bb7e2
@ -36,12 +36,12 @@ function venv {
|
||||
if (Test-Path "$env:WORKON_HOME/$venv/Scripts/activate.ps1") {
|
||||
& "$env:WORKON_HOME/$venv/Scripts/activate.ps1"
|
||||
}
|
||||
elseif (Test-Path (Join-Path $PWD $venv)) {
|
||||
& "$venv/Scripts/activate.ps1"
|
||||
}
|
||||
elseif ((!$venv -Or !$venv.Trim()) -And (Test-Path "venv/Scripts/activate.ps1")) {
|
||||
& "venv/Scripts/activate.ps1"
|
||||
}
|
||||
elseif (Test-Path (Join-Path $PWD $venv)) {
|
||||
& "$venv/Scripts/activate.ps1"
|
||||
}
|
||||
else {
|
||||
Write-Error "Environment '${venv}' does not exists."
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user