Skip to content

Commit 6d51f01

Browse files
authored
Merge pull request #398 from Icinga:fix/remove_stringbuilder_output_from_new_component
Fix: Removes String.Builder output while creating new components Fixes String.Builder object output, while creating new components by using `New-IcingaForWindowsComponent`
2 parents e4c879f + 96476db commit 6d51f01

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

doc/100-General/10-Changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ documentation before upgrading to a new release.
77

88
Released closed milestones can be found on [GitHub](https://github.com/Icinga/icinga-powershell-framework/milestones?state=closed).
99

10+
## 1.8.0 (2022-02-08)
11+
12+
[Issue and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/19?closed=1)
13+
14+
### Bugfixes
15+
16+
* [#398](https://github.com/Icinga/icinga-powershell-framework/pull/398) Fixes String.Builder object output, while creating new components by using `New-IcingaForWindowsComponent`
17+
1018
## 1.7.0 (2021-11-09)
1119

1220
[Issue and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/16?closed=1)

lib/core/dev/Write-IcingaForWindowsComponentManifest.psm1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ function Write-IcingaForWindowsComponentManifest()
5050
[int]$CurrentIndex = 0;
5151
foreach ($module in $Value) {
5252
$CurrentIndex += 1;
53-
$ContentString.Append('@{ ');
53+
$ContentString.Append('@{ ') | Out-Null;
5454

5555
foreach ($dependency in $module.Keys) {
5656
$DependencyValue = $module[$dependency];
5757

58-
$ContentString.Append([string]::Format("{0} = '{1}'; ", $dependency, $DependencyValue));
58+
$ContentString.Append([string]::Format("{0} = '{1}'; ", $dependency, $DependencyValue)) | Out-Null;
5959
}
60-
$ContentString.Append('}');
60+
$ContentString.Append('}') | Out-Null;
6161

6262
if ($CurrentIndex -ne $Value.Count) {
63-
$ContentString.Append(",`r`n ");
63+
$ContentString.Append(",`r`n ") | Out-Null;
6464
}
6565
}
6666

@@ -73,7 +73,7 @@ function Write-IcingaForWindowsComponentManifest()
7373
Write-IcingaFileSecure -File (Join-Path -Path $ModuleDir -ChildPath ([string]::Format('{0}.psd1', $ModuleName))) -Value $ManifestFileData;
7474
}
7575

76-
$ContentString.Clear();
76+
$ContentString.Clear() | Out-Null;
7777

7878
[array]$ManifestContent = Get-Content -Path (Join-Path -Path $ModuleDir -ChildPath ([string]::Format('{0}.psd1', $ModuleName)));
7979

0 commit comments

Comments
 (0)