From 3078a0a93755878b69e82e229eb1819c649c5bd3 Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Mon, 22 Jul 2019 08:37:54 +0200 Subject: [PATCH] Fixed spacing for multi-stack packages / checks in output --- lib/icinga/plugin/New-IcingaCheckPackage.psm1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/icinga/plugin/New-IcingaCheckPackage.psm1 b/lib/icinga/plugin/New-IcingaCheckPackage.psm1 index 3f99b99..b7f4060 100644 --- a/lib/icinga/plugin/New-IcingaCheckPackage.psm1 +++ b/lib/icinga/plugin/New-IcingaCheckPackage.psm1 @@ -38,6 +38,10 @@ function New-IcingaCheckPackage() $Check | Add-Member -membertype ScriptMethod -name 'AddSpacing' -value { $this.spacing += 1; + foreach ($check in $this.checks) { + $check.spacing = $this.spacing; + $check.AddSpacing(); + } } $Check | Add-Member -membertype ScriptMethod -name 'Compile' -value {