Fix argument redirection

This commit is contained in:
Manuel Thalmann 2024-08-05 22:49:44 +02:00
parent e7ced15185
commit b566d63ef2

View file

@ -12,7 +12,7 @@ $null = New-Module {
[scriptblock] $Configurator = { },
[scriptblock] $UserConfigurator = { },
[InstallerAction] $Action = [InstallerAction]::Install,
[hashtable] $Arguments
[hashtable] $Arguments = @{ }
)
if (-not $Name) {
@ -45,7 +45,8 @@ $null = New-Module {
foreach ($user in Get-Users) {
$Arguments.Add($userArgument, $user);
& $installHandler -Action ([InstallerAction]::ConfigureUser) -Arguments $Arguments;
$argumentList.Add("action", [InstallerAction]::ConfigureUser);
& $installHandler @argumentList;
}
} elseif ($Action -eq ([InstallerAction]::ConfigureUser)) {
if ((-not $Arguments.ContainsKey($userArgument)) -or ($null -eq $Arguments[$userArgument])) {