From 67e2f558027ddafa7e1ebb6c8c86aa80cca129c6 Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Tue, 5 Nov 2019 09:43:06 +0100 Subject: [PATCH] Fixes empty variable content --- .../misc/Start-IcingaAgentInstallWizard.psm1 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 b/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 index e740417..09079dc 100644 --- a/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 +++ b/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 @@ -363,7 +363,11 @@ function Start-IcingaAgentInstallWizard() } else { $InstallerArguments += "-Ticket '$Ticket'"; } - $InstallerArguments += "-EmptyTicket $EmptyTicket" + if ($null -eq $EmptyTicket) { + $InstallerArguments += "-EmptyTicket 1" + } else { + $InstallerArguments += "-EmptyTicket $EmptyTicket" + } } } else { if ([string]::IsNullOrEmpty($CAFile) -And $null -eq $EmptyCA) { @@ -385,7 +389,11 @@ function Start-IcingaAgentInstallWizard() } else { $InstallerArguments += "-CAFile '$CAFile'"; } - $InstallerArguments += "-EmptyCA $EmptyCA" + if ($null -eq $EmptyCA) { + $InstallerArguments += "-EmptyCA 1" + } else { + $InstallerArguments += "-EmptyCA $EmptyCA" + } } }