From 1bc0226ca786411da3be8a6e7ec533546bbae3fa Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 21 Mar 2024 00:00:33 +0100 Subject: [PATCH] Remove unnecessary script parameters --- scripts/Common/Config/powershell/lib.ps1 | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/scripts/Common/Config/powershell/lib.ps1 b/scripts/Common/Config/powershell/lib.ps1 index 506aa9a9..bb3f9c24 100644 --- a/scripts/Common/Config/powershell/lib.ps1 +++ b/scripts/Common/Config/powershell/lib.ps1 @@ -6,9 +6,6 @@ $null = New-Module { [switch]$System, [Parameter(ParameterSetName="Home")] [string]$HomeDir = "~", - [Parameter(ParameterSetName="Profile", Mandatory)] - [string]$ProfileRoot, - [Parameter(ParameterSetName="Profile", Mandatory)] [Parameter(ParameterSetName="Global", Mandatory)] [Parameter(ParameterSetName="Home")] [string]$Category = $null, @@ -28,10 +25,8 @@ $null = New-Module { $configRoot = "/etc"; } - $ProfileRoot = "$configRoot/powershell"; - } - - if (-not $ProfileRoot) { + $profiles = @("$configRoot/powershell/."); + } else { [System.Collections.Generic.List[string]] $shells = @(); if (Get-Command pwsh -ErrorAction SilentlyContinue) { @@ -49,8 +44,6 @@ $null = New-Module { Push-Location ~; $profiles = $profiles | ForEach-Object { [System.IO.Path]::GetRelativePath($(Get-Location), $_); }; - } else { - $profiles = @("$ProfileRoot/."); } if ($Category) {