Ensure Arguments contains an object

This commit is contained in:
Manuel Thalmann 2024-08-05 22:51:29 +02:00
parent 304a99ce68
commit 3c7ee2c4c1

View file

@ -12,9 +12,11 @@ $null = New-Module {
[scriptblock] $Configurator = { }, [scriptblock] $Configurator = { },
[scriptblock] $UserConfigurator = { }, [scriptblock] $UserConfigurator = { },
[InstallerAction] $Action = [InstallerAction]::Install, [InstallerAction] $Action = [InstallerAction]::Install,
[hashtable] $Arguments = @{ } [hashtable] $Arguments
) )
$Arguments ??= @{ };
if (-not $Name) { if (-not $Name) {
$Name = Split-Path -Leaf (Split-Path -Parent ((Get-PSCallStack)[1].ScriptName)); $Name = Split-Path -Leaf (Split-Path -Parent ((Get-PSCallStack)[1].ScriptName));
} }