Skip to content

Commit

Permalink
fix(pwsh): validate theme path existence
Browse files Browse the repository at this point in the history
resolves #4359
  • Loading branch information
JanDeDobbeleer committed Oct 18, 2023
1 parent 222e97f commit cb932ac
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/shell/scripts/omp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 = @'
__ _____ _ ___ ___ ______ _ __
/ / | _ | | | \/ | | ___ \ | | \ \
Expand Down

0 comments on commit cb932ac

Please sign in to comment.