mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-10 13:04:04 -08:00
fix: export-poshtheme ~ issue
Fix regression introduced by previous commit(~)
This commit is contained in:
parent
46bdc4537d
commit
cdd4090c03
|
@ -150,6 +150,9 @@ function global:Export-PoshTheme {
|
||||||
$configString = @(&$omp --config="$config" --config-format="$Format" --print-config 2>&1)
|
$configString = @(&$omp --config="$config" --config-format="$Format" --print-config 2>&1)
|
||||||
# if no path, copy to clipboard by default
|
# if no path, copy to clipboard by default
|
||||||
if ($FilePath -ne "") {
|
if ($FilePath -ne "") {
|
||||||
|
if ($FilePath.StartsWith('~')) {
|
||||||
|
$FilePath = $FilePath.Replace('~', $HOME)
|
||||||
|
}
|
||||||
$FilePath = [IO.Path]::GetFullPath($FilePath)
|
$FilePath = [IO.Path]::GetFullPath($FilePath)
|
||||||
[IO.File]::WriteAllLines($FilePath, $configString)
|
[IO.File]::WriteAllLines($FilePath, $configString)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue