Fixed CheckCommand callback to fetch executed command

This commit is contained in:
Lord Hepipud 2019-10-05 21:59:37 +02:00
parent 16f5c5fe13
commit a2afbbe5fc

View file

@ -17,7 +17,7 @@ function New-IcingaCheckresult()
return $IcingaEnums.IcingaExitCode.Unknown; return $IcingaEnums.IcingaExitCode.Unknown;
} }
$CheckCommand = (Get-PSCallStack)[1].Command; $CheckCommand = (Get-PSCallStack)[2].Command;
# Compile the check / package if not already done # Compile the check / package if not already done
$this.check.AssignCheckCommand($CheckCommand); $this.check.AssignCheckCommand($CheckCommand);