lib/beaker/command.rb in beaker-3.14.0 vs lib/beaker/command.rb in beaker-3.15.0
- old
+ new
@@ -71,15 +71,16 @@
# @return [String] This returns the fully formed command line invocation.
def cmd_line host, cmd = @command, env = @environment, pc = @prepend_cmds
env_string = host.environment_string( env )
prepend_commands = host.prepend_commands( cmd, pc, :cmd_exe => @cmdexe )
if host[:platform] =~ /cisco/ && host[:user] != 'root'
- append_command = '"'
+ append_command = '"'
cmd = cmd.gsub('"') { '\\"' }
end
# This will cause things like `puppet -t -v agent` which is maybe bad.
- cmd_line_array = [env_string, prepend_commands, cmd, options_string, args_string, append_command]
+ cmd_line_array = [env_string, prepend_commands, cmd, options_string, args_string]
+ cmd_line_array << append_command unless (cmd =~ /ntpdate/ && host[:platform] =~ /cisco_nexus/)
cmd_line_array.compact.reject( &:empty? ).join( ' ' )
end
# @param [Hash] opts These are the options that the command takes
#