When using a job in PowerShell Windows 5,1 for running the Exporter, the job will fail with
Exception setting "TreatControlCAsInput": "The handle is invalid.
"
At C:\Program Files\WindowsPowerShell\Modules\PromethuesExporter\0.1.0\PrometheusExporter.psm1:117 char:9
+ [Console]::TreatControlCAsInput = $True
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], SetValueInvocationException
+ FullyQualifiedErrorId : ExceptionsWhenSetting
as a job has no input handler.
A switch, -Interactive, might be an appropriate change to use when Ctrl-C is a viable input.
Or better yet, don't look for Ctrl-C at all, the script will still abort when breaking...
When using a job in PowerShell Windows 5,1 for running the Exporter, the job will fail with
as a job has no input handler.
A switch,
-Interactive, might be an appropriate change to use whenCtrl-Cis a viable input.Or better yet, don't look for
Ctrl-Cat all, the script will still abort when breaking...