Make PowerShell profile installation cross platform
This commit is contained in:
parent
cb0807ee72
commit
e75a0c8420
1 changed files with 9 additions and 1 deletions
|
@ -20,7 +20,15 @@ $null = New-Module {
|
||||||
[System.Collections.Generic.List[string]] $profiles = @();
|
[System.Collections.Generic.List[string]] $profiles = @();
|
||||||
|
|
||||||
if ($System) {
|
if ($System) {
|
||||||
$ProfileRoot = "$env:ProgramData/powershell";
|
$configRoot;
|
||||||
|
|
||||||
|
if ($IsWindows) {
|
||||||
|
$configRoot = "$env:ProgramData";
|
||||||
|
} else {
|
||||||
|
$configRoot = "/etc";
|
||||||
|
}
|
||||||
|
|
||||||
|
$ProfileRoot = "$configRoot/powershell";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (-not $ProfileRoot) {
|
if (-not $ProfileRoot) {
|
||||||
|
|
Loading…
Reference in a new issue