fix(pwsh): get filesystem path for configs

resolves #715
This commit is contained in:
Jan De Dobbeleer 2021-05-21 08:23:12 +02:00 committed by Jan De Dobbeleer
parent ae2042abcb
commit 894b84fa85
2 changed files with 4 additions and 3 deletions

View file

@ -51,10 +51,11 @@ function Set-PoshPrompt {
$config = ""
if (Test-Path "$PSScriptRoot/themes/$Theme.omp.json") {
$config = "$PSScriptRoot/themes/$Theme.omp.json"
$path = "$PSScriptRoot/themes/$Theme.omp.json"
$config = (Resolve-Path -Path $path).ProviderPath
}
elseif (Test-Path $Theme) {
$config = (Resolve-Path -Path $Theme).Path
$config = (Resolve-Path -Path $Theme).ProviderPath
}
else {
$config = "$PSScriptRoot/themes/jandedobbeleer.omp.json"

View file

@ -13,7 +13,7 @@ $global:omp_lastHistoryId = -1
$config = "::CONFIG::"
if (Test-Path $config) {
$global:PoshSettings.Theme = (Resolve-Path -Path $config).Path
$global:PoshSettings.Theme = (Resolve-Path -Path $config).ProviderPath
}
function global:Set-PoshContext {}