From 705e138bbffa49ae74a298d5dae3acb4bcac1176 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 f3c062992..5167b87f8 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 }}"); } } };