From 40d60ad1728dcc6b96e557f67f18fee619d5e5a9 Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Wed, 10 Nov 2021 10:24:42 +0100 Subject: [PATCH] Fixes object output of string builder --- .../dev/Write-IcingaForWindowsComponentManifest.psm1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/core/dev/Write-IcingaForWindowsComponentManifest.psm1 b/lib/core/dev/Write-IcingaForWindowsComponentManifest.psm1 index 45f74d8..dad4e8f 100644 --- a/lib/core/dev/Write-IcingaForWindowsComponentManifest.psm1 +++ b/lib/core/dev/Write-IcingaForWindowsComponentManifest.psm1 @@ -50,17 +50,17 @@ function Write-IcingaForWindowsComponentManifest() [int]$CurrentIndex = 0; foreach ($module in $Value) { $CurrentIndex += 1; - $ContentString.Append('@{ '); + $ContentString.Append('@{ ') | Out-Null; foreach ($dependency in $module.Keys) { $DependencyValue = $module[$dependency]; - $ContentString.Append([string]::Format("{0} = '{1}'; ", $dependency, $DependencyValue)); + $ContentString.Append([string]::Format("{0} = '{1}'; ", $dependency, $DependencyValue)) | Out-Null; } - $ContentString.Append('}'); + $ContentString.Append('}') | Out-Null; if ($CurrentIndex -ne $Value.Count) { - $ContentString.Append(",`r`n "); + $ContentString.Append(",`r`n ") | Out-Null; } } @@ -73,7 +73,7 @@ function Write-IcingaForWindowsComponentManifest() Write-IcingaFileSecure -File (Join-Path -Path $ModuleDir -ChildPath ([string]::Format('{0}.psd1', $ModuleName))) -Value $ManifestFileData; } - $ContentString.Clear(); + $ContentString.Clear() | Out-Null; [array]$ManifestContent = Get-Content -Path (Join-Path -Path $ModuleDir -ChildPath ([string]::Format('{0}.psd1', $ModuleName)));