Ensure Arguments contains an object

This commit is contained in:
Manuel Thalmann 2024-08-05 22:51:29 +02:00
parent 68aaa413a6
commit 7f652770d1

View file

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