You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by dj...@apache.org on 2009/06/23 02:01:02 UTC
svn commit: r787455 - /buildr/trunk/lib/buildr/core/util.rb
Author: djspiewak
Date: Tue Jun 23 00:01:02 2009
New Revision: 787455
URL: http://svn.apache.org/viewvc?rev=787455&view=rev
Log:
Differences between `system` and `sh` in implementation
Modified:
buildr/trunk/lib/buildr/core/util.rb
Modified: buildr/trunk/lib/buildr/core/util.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/util.rb?rev=787455&r1=787454&r2=787455&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/util.rb (original)
+++ buildr/trunk/lib/buildr/core/util.rb Tue Jun 23 00:01:02 2009
@@ -362,11 +362,13 @@
rake_output_message cmd.join(" ") if options[:verbose]
unless options[:noop]
cd = "cd '#{Dir.pwd}' && "
- res = if windows_os? && cmd.size == 1
+ args = if cmd.size > 1 then cmd[1..cmd.size] else [] end
+
+ res = if Buildr::Util.win_os? && cmd.size == 1
__native_system__("#{cd} call #{cmd.first}") == 0
else
arg_str = args.map { |a| "'#{a}'" }
- __native_system__(cd + cmd + ' ' + arg_str.join(' ')) == 0
+ __native_system__(cd + cmd.first + ' ' + arg_str.join(' ')) == 0
end
$? = Buildr::ProcessStatus.new(0, res) # KLUDGE