Skip to main content

DeprecatedShelloutMethods

The department is: DeprecatedShelloutMethods

The full name of the cop is: Chef/Deprecations/DeprecatedShelloutMethods

Enabled by default Supports autocorrection Target Chef Version
Enabled No 14.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

Name Default value Configurable values
Version Added 6.3.0 String
Include
Array

Was this page helpful?

×









Search Results