sensu-plugins / sensu-plugins-windows

Sensu Windows Plugins
http://sensu-plugins.io
MIT License
22 stars 46 forks source link

requirements on powershell 3.0 or above #39

Closed simonsteur closed 7 years ago

simonsteur commented 7 years ago

referring to issue #38 where on powershell 2.0 any exit code other than 0 or 1 doesn't get interpreted properly by powershell if a script was executed with the -file flag.

example: powershell.exe -file .\check-windows-disk.ps1 5 10

This fix will require users to upgrade their versions of powershell (to at least version 3.0) to be able to run the checks. This is required to be able to get the correct check results back. Also included is an update to the readme stating this dependency.

majormoses commented 7 years ago

I do need a changelog entry especially since this is technically a breaking change though not sure who is affected as I believe powershell 2.x is quite old...

majormoses commented 7 years ago

@simonsteur can you rebase and add a changelog entry?

simonsteur commented 7 years ago

@majormoses done.

simonsteur commented 7 years ago

Although I don't think these checks could every function properly on PSv2, I do agree that it's better to play safe. I rebased and made the changes.

majormoses commented 7 years ago

released: https://rubygems.org/gems/sensu-plugins-windows/versions/2.0.0