buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djspie...@apache.org
Subject svn commit: r787455 - /buildr/trunk/lib/buildr/core/util.rb
Date Tue, 23 Jun 2009 00:01:02 GMT
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
         



Mime
View raw message