Ensure Arguments contains an object

This commit is contained in:
Manuel Thalmann 2024-08-05 22:51:29 +02:00
parent b566d63ef2
commit 3708aa8e2b

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));
} }