fix(pwsh): avoid Test-Path error on "no config"

This commit is contained in:
L. Yeung 2022-05-27 21:32:36 +08:00 committed by Jan De Dobbeleer
parent e41304ae44
commit 2230e2b695

View file

@ -23,7 +23,7 @@ New-Module -Name "oh-my-posh-core" -ScriptBlock {
$script:TransientPrompt = $false
$env:POWERLINE_COMMAND = "oh-my-posh"
$env:CONDA_PROMPT_MODIFIER = $false
if (Test-Path '::CONFIG::') {
if ('::CONFIG::' -ne '' -and (Test-Path '::CONFIG::')) {
$env:POSH_THEME = (Resolve-Path -Path '::CONFIG::').ProviderPath
}
# specific module support (disabled by default)