mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
fix: export-poshtheme issue with relative path
Path.GetFullPath used to resolve full or relative paths
This commit is contained in:
parent
79fa990205
commit
46bdc4537d
|
@ -148,12 +148,9 @@ function global:Export-PoshTheme {
|
|||
$config = $global:PoshSettings.Theme
|
||||
$omp = "::OMP::"
|
||||
$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)
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue