Make PowerShell profile installation cross platform

This commit is contained in:
Manuel Thalmann 2024-03-20 23:53:49 +01:00
parent 06769aef0c
commit 6903a47883

View file

@ -20,7 +20,15 @@ $null = New-Module {
[System.Collections.Generic.List[string]] $profiles = @();
if ($System) {
$ProfileRoot = "$env:ProgramData/powershell";
$configRoot;
if ($IsWindows) {
$configRoot = "$env:ProgramData";
} else {
$configRoot = "/etc";
}
$ProfileRoot = "$configRoot/powershell";
}
if (-not $ProfileRoot) {