From cdd4090c03343297263acc8ee254b38ca06f728a Mon Sep 17 00:00:00 2001 From: lnu Date: Fri, 28 May 2021 06:59:24 +0200 Subject: [PATCH] fix: export-poshtheme ~ issue Fix regression introduced by previous commit(~) --- src/init/omp.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/init/omp.ps1 b/src/init/omp.ps1 index ae13b060..997c7820 100644 --- a/src/init/omp.ps1 +++ b/src/init/omp.ps1 @@ -150,6 +150,9 @@ function global:Export-PoshTheme { $configString = @(&$omp --config="$config" --config-format="$Format" --print-config 2>&1) # if no path, copy to clipboard by default if ($FilePath -ne "") { + if ($FilePath.StartsWith('~')) { + $FilePath = $FilePath.Replace('~', $HOME) + } $FilePath = [IO.Path]::GetFullPath($FilePath) [IO.File]::WriteAllLines($FilePath, $configString) }