Determine installer action properly
This commit is contained in:
parent
806478db65
commit
ea53352de6
|
@ -205,7 +205,7 @@ $null = New-Module {
|
||||||
)
|
)
|
||||||
|
|
||||||
[InstallerAction] $Action = & {
|
[InstallerAction] $Action = & {
|
||||||
if ($Action.HasValue) {
|
if ($null -ne $Action) {
|
||||||
$Action;
|
$Action;
|
||||||
} else {
|
} else {
|
||||||
[InstallerAction]::Install;
|
[InstallerAction]::Install;
|
||||||
|
|
|
@ -178,13 +178,13 @@ $null = New-Module {
|
||||||
#>
|
#>
|
||||||
function Deploy-SoftwareAction {
|
function Deploy-SoftwareAction {
|
||||||
param(
|
param(
|
||||||
[InstallerAction] $Action
|
[InstallerAction] $Action = $null
|
||||||
)
|
)
|
||||||
|
|
||||||
[bool] $install = $null;
|
[bool] $install = $null;
|
||||||
$arguments = [hashtable]@{ };
|
$arguments = [hashtable]@{ };
|
||||||
|
|
||||||
if ($Action) {
|
if ($null -ne $Action) {
|
||||||
$install = ($Action -eq ([InstallerAction]::Install));
|
$install = ($Action -eq ([InstallerAction]::Install));
|
||||||
$null = $arguments.Add("action", $Action);
|
$null = $arguments.Add("action", $Action);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue