Module | Chef::Mixin::Command
In: | lib/chef/mixin/command/windows.rb lib/chef/mixin/command/unix.rb lib/chef/mixin/command.rb

### Methods

chdir_or_tmpdir handle_command_failures output_of_command run_command run_command_with_systems_locale

### Included Modules

::Chef::Mixin::Command::Windows ::Chef::Mixin::Command::Unix

### Classes and Modules

Module Chef::Mixin::Command::Unix
Module Chef::Mixin::Command::Windows

### Public Instance methods

chdir_or_tmpdir(dir, &block)

module_function :popen4

handle_command_failures(status, command_output, opts={})
output_of_command(command, args)
run_command(args={})

### Parameters

args<Hash>: A number of required and optional arguments

      command<String>, <Array>: A complete command with options to execute or a command and options as an Array
      creates<String>: The absolute path to a file that prevents the command from running if it exists
      cwd<String>: Working directory to execute command in, defaults to Dir.tmpdir
      timeout<String>: How many seconds to wait for the command to execute before timing out
      returns<String>: The single exit value command is expected to return, otherwise causes an exception
      ignore_failure<Boolean>: Whether to raise an exception on failure, or just return the status
      output_on_failure<Boolean>: Return output in raised exception regardless of Log.level

      user<String>: The UID or user name of the user to execute the command as
      group<String>: The GID or group name of the group to execute the command as
      environment<Hash>: Pairs of environment variable names and their values to set before execution

### Returns

Returns the exit status of args[:command]

run_command_with_systems_locale(args={})

Call run_command but set LC_ALL to the system‘s current environment so it doesn‘t get changed to C.

### Parameters

args<Hash>: A number of required and optional arguments that will be handed out to run_command

### Returns

Returns the result of run_command

[Validate]