Determine installer action properly

This commit is contained in:
Manuel Thalmann 2024-08-10 15:15:21 +02:00
parent 3ee92c243e
commit e9e24e243d
2 changed files with 3 additions and 3 deletions

View file

@ -205,7 +205,7 @@ $null = New-Module {
)
[InstallerAction] $Action = & {
if ($Action.HasValue) {
if ($null -ne $Action) {
$Action;
} else {
[InstallerAction]::Install;

View file

@ -175,13 +175,13 @@ $null = New-Module {
#>
function Deploy-SoftwareAction {
param(
[InstallerAction] $Action
[InstallerAction] $Action = $null
)
[bool] $install = $null;
$arguments = [hashtable]@{ };
if ($Action) {
if ($null -ne $Action) {
$install = ($Action -eq ([InstallerAction]::Install));
$null = $arguments.Add("action", $Action);
} else {