Chef/Deprecations/PowershellCookbookHelpers
The Cookstyle cops department: Chef/Deprecations
| Enabled by default | Supports autocorrection | Target Chef Version |
|---|---|---|
| Enabled | Yes | All Versions |
Use node['powershell']['version'] or the new powershell_version helper available in Chef Infra Client 15.8+ instead of the deprecated PowerShell cookbook helpers
Examples
incorrect
Powershell::VersionHelper.powershell_version?('4.0')
correct
node['powershell']['version'].to_f == 4.0
# better (Chef Infra Client 15.8+)
powershell_version == 4.0
Configurable attributes
| Name | Default value | Configurable values |
|---|---|---|
| Version Added | 6.1.0 | String |
| Include | Array |