From 2230e2b6954beef82ca2eb80803a8f527b0c3fed Mon Sep 17 00:00:00 2001 From: "L. Yeung" Date: Fri, 27 May 2022 21:32:36 +0800 Subject: [PATCH] fix(pwsh): avoid `Test-Path` error on "no config" --- src/shell/scripts/omp.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shell/scripts/omp.ps1 b/src/shell/scripts/omp.ps1 index 1d0ef62c..e1a6e0a8 100644 --- a/src/shell/scripts/omp.ps1 +++ b/src/shell/scripts/omp.ps1 @@ -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)