From cfd3cfc12f536640ed3a0290ec52677e0b7d62d2 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 8 Sep 2024 17:42:11 +0200 Subject: [PATCH] Make Oh-My-Posh theme location dynamic --- scripts/Common/Software/Oh My Posh/Manage.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Common/Software/Oh My Posh/Manage.ps1 b/scripts/Common/Software/Oh My Posh/Manage.ps1 index 0c7c7e34..d3314ff9 100644 --- a/scripts/Common/Software/Oh My Posh/Manage.ps1 +++ b/scripts/Common/Software/Oh My Posh/Manage.ps1 @@ -48,10 +48,10 @@ Start-SoftwareInstaller @PSBoundParameters ` } if ($IsWindows) { - [System.Environment]::SetEnvironmentVariable($varName, $path, "User"); + [System.Environment]::SetEnvironmentVariable($varName, "%AppData%/$([System.IO.Path]::GetRelativePath($env:AppData, $path))", "User"); } else { . "$PSScriptRoot/../aliae/Manage.ps1"; - Add-EnvironmentVariable -User $Arguments.Name $varName $path; + Add-EnvironmentVariable -User $Arguments.Name $varName ($path).Replace("~", "{{ .Home }}"); } } };