From 205cfe384775e7408b8cc9ed38fc298e1afe6af2 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Wed, 18 Oct 2023 10:21:31 +0200 Subject: [PATCH] fix(pwsh): validate theme path existence resolves #4359 --- src/shell/scripts/omp.ps1 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/shell/scripts/omp.ps1 b/src/shell/scripts/omp.ps1 index 7caf698c..feffa860 100644 --- a/src/shell/scripts/omp.ps1 +++ b/src/shell/scripts/omp.ps1 @@ -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 = @' __ _____ _ ___ ___ ______ _ __ / / | _ | | | \/ | | ___ \ | | \ \