Skip to main content

Chef/Deprecations/UsesRunCommandHelper

Cookstyle cops page

The Cookstyle cops department: Chef/Deprecations

Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledNoAll Versions

Use ‘shell_out!’ instead of the legacy ‘run_command’ or ‘run_command_with_systems_locale’ helpers for shelling out. The run_command helper was removed in Chef Infra Client 13.

Examples

incorrect

require 'chef/mixin/command'
include Chef::Mixin::Command

run_command('/bin/foo')
run_command_with_systems_locale('/bin/foo')

correct

shell_out!('/bin/foo')

Configurable attributes

NameDefault valueConfigurable values
Version Added5.9.0String
Include
    Array

    Thank you for your feedback!

    ×









    Search Results