lib/beaker/host/unix/exec.rb
# Construct the environment string for this command
#
# @param [Hash{String=>String}] env   An optional Hash containing
#                                     key-value pairs to be treated
#                                     as environment variables that
#                                     should be set for the duration
#                                     of the puppet command.
#
# @return [String] Returns a string containing command line arguments that
#                  will ensure the environment is correctly set for the
#                  given host.
Construct the environment string for this command
Construct the environment string for this command
def environment_string env
    return '' if env.empty?
    env_array = self.environment_variable_string_pair_array( env )
    environment_string = env_array.join(' ')
    "env #{environment_string}"
  end
def environment_string env return '' if env . empty? env_array = self . environment_variable_string_pair_array ( env ) environment_string = env_array . join ( ' ' ) "env #{environment_string}" end
Construct the environment string for this command
Construct the environment string for this command
Returns a string containing command line arguments that will ensure the environment is correctly set for the given host.
Returns a string containing command line arguments that will ensure the environment is correctly set for the given host .
String
env
env An optional Hash containing key-value pairs to be treated as environment variables that should be set for the duration of the puppet command.
env An optional Hash containing key - value pairs to be treated as environment variables that should be set for the duration of the puppet command .