Skip to main content

Chef/Deprecations/Ruby27KeywordArgumentWarnings

Cookstyle cops page

The Cookstyle cops department: Chef/Deprecations

Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledYesAll Versions

Pass options to shell_out helpers without the brackets to avoid Ruby 2.7 deprecation warnings.

Examples

incorrect

shell_out!('hostnamectl status', { returns: [0, 1] })
shell_out('hostnamectl status', { returns: [0, 1] })

correct

shell_out!('hostnamectl status', returns: [0, 1])
shell_out('hostnamectl status', returns: [0, 1])

Configurable attributes

NameDefault valueConfigurable values
Version Added6.5.0String
Include
    Array

    Thank you for your feedback!

    ×









    Search Results