lib/beaker/command.rb in beaker-2.5.0 vs lib/beaker/command.rb in beaker-2.5.1
- old
+ new
@@ -68,10 +68,10 @@
#
# @return [String] This returns the fully formed command line invocation.
def cmd_line host, cmd = @command, env = @environment
env_string = env.nil? ? '' : environment_string_for( host, env )
- cygwin = ((host['platform'] =~ /windows/) and @cmdexe) ? 'cmd.exe /c' : nil
+ cygwin = ((host['platform'] =~ /windows/) and host.is_cygwin? and @cmdexe) ? 'cmd.exe /c' : nil
# This will cause things like `puppet -t -v agent` which is maybe bad.
[env_string, cygwin, cmd, options_string, args_string].compact.reject(&:empty?).join(' ')
end