Skip to content

Commit a29d66d

Browse files
committed
Fixes config writer publishing invalid Icinga plain config
1 parent e2bd207 commit a29d66d

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
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.11.1 (tbd)
11+
12+
[Issues and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/29)
13+
14+
### Bugfixes
15+
16+
* [#659](https://github.com/Icinga/icinga-powershell-framework/pull/659) Fixes configuration writer which publishes invalid Icinga plain configuration files
17+
1018
## 1.11.0 (2023-08-01)
1119

1220
[Issues and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/26)

lib/core/tools/Get-IcingaCheckCommandConfig.psm1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,11 @@ function Write-IcingaPlainConfigurationFiles()
666666
$AddNewLine = $FALSE;
667667
}
668668
[string]$Value = $CheckCommand.vars[$var];
669-
$IcingaConfig += [string]::Format(' vars.{0} = {1}{2}', $var, $Value.ToLower(), (New-IcingaNewLine));
669+
if ($CheckCommand.vars[$var] -Is [bool]) {
670+
$IcingaConfig += [string]::Format(' vars.{0} = {1}{2}', $var, $Value.ToLower(), (New-IcingaNewLine));
671+
} else {
672+
$IcingaConfig += [string]::Format(' vars.{0} = "{1}"{2}', $var, $Value.ToLower(), (New-IcingaNewLine));
673+
}
670674
}
671675
}
672676
} else {

0 commit comments

Comments
 (0)