Make PowerShell profile installation cross platform

This commit is contained in:
Manuel Thalmann 2024-03-20 23:53:49 +01:00
parent cb0807ee72
commit e75a0c8420

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) {