diff --git a/scripts/configure-ocsentinel-ninja.ps1 b/scripts/configure-ocsentinel-ninja.ps1 index f200d5a..2e67035 100644 --- a/scripts/configure-ocsentinel-ninja.ps1 +++ b/scripts/configure-ocsentinel-ninja.ps1 @@ -10,7 +10,11 @@ function Get-NinjaValue { param([Parameter(Mandatory)][string]$Name) $value = [Environment]::GetEnvironmentVariable($Name, "Process") - return if ($null -eq $value) { "" } else { $value.Trim() } + if ($null -eq $value) { + return "" + } + + return $value.Trim() } if ([string]::IsNullOrWhiteSpace($WebhookUrl)) { diff --git a/scripts/install-ocsentinel-ninja-once.ps1 b/scripts/install-ocsentinel-ninja-once.ps1 index cdb7980..f9dcd74 100644 --- a/scripts/install-ocsentinel-ninja-once.ps1 +++ b/scripts/install-ocsentinel-ninja-once.ps1 @@ -13,7 +13,11 @@ function Get-NinjaValue { param([Parameter(Mandatory)][string]$Name) $value = [Environment]::GetEnvironmentVariable($Name, "Process") - return if ($null -eq $value) { "" } else { $value.Trim() } + if ($null -eq $value) { + return "" + } + + return $value.Trim() } if ([string]::IsNullOrWhiteSpace($WebhookUrl)) { $WebhookUrl = Get-NinjaValue -Name "webhookurl" }