Skip to main content

Chef/Deprecations/DeprecatedShelloutMethods

Cookstyle cops page

The Cookstyle cops department: Chef/Deprecations

Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledNo14.3+

The large number of shell_out helper methods in Chef Infra Client has been reduced to just shell_out and shell_out! methods. The legacy methods were removed in Chef Infra Client and cookbooks using these legacy helpers will need to be updated.

Examples

incorrect

shell_out_compact('foo')
shell_out_compact!('foo')
shell_out_with_timeout('foo')
shell_out_with_timeout!('foo')
shell_out_with_systems_locale('foo')
shell_out_with_systems_locale!('foo')
shell_out_compact_timeout('foo')
shell_out_compact_timeout!('foo')

correct

shell_out('foo')
shell_out!('foo')
shell_out!('foo', default_env: false) # replaces shell_out_with_systems_locale

Configurable attributes

NameDefault valueConfigurable values
Version Added6.3.0String
Include
    Array

    Thank you for your feedback!

    ×