fix(pwsh): validate theme path existence

resolves #4359
This commit is contained in:
Jan De Dobbeleer 2023-10-18 10:21:31 +02:00 committed by Jan De Dobbeleer
parent 222e97f4bd
commit 205cfe3847

View file

@ -301,14 +301,12 @@ New-Module -Name "oh-my-posh-core" -ScriptBlock {
$List
)
if ($Path -eq "") {
do {
$temp = Read-Host 'Please enter the themes path'
}
while (-not (Test-Path -LiteralPath $temp))
$Path = (Resolve-Path -Path $temp).ProviderPath
while (-not (Test-Path -LiteralPath $Path)) {
$Path = Read-Host 'Please enter the themes path'
}
$Path = (Resolve-Path -Path $temp).ProviderPath
$logo = @'
__ _____ _ ___ ___ ______ _ __
/ / | _ | | | \/ | | ___ \ | | \ \