Skip to main content

Chef/Deprecations/PowershellCookbookHelpers

Cookstyle cops page

The Cookstyle cops department: Chef/Deprecations

Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledYesAll 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

NameDefault valueConfigurable values
Version Added6.1.0String
Include
    Array

    Thank you for your feedback!

    ×











    Search Results