Make Oh-My-Posh theme location dynamic

This commit is contained in:
Manuel Thalmann 2024-09-08 17:42:11 +02:00
parent 4b09cd1f87
commit 90e876699d

View file

@ -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 }}");
}
}
};