Skip to content

Commit

Permalink
added "call" to windows shell commands that need shell expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
jimweirich committed Sep 6, 2008
1 parent fa02277 commit 9981a2f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/rake.rb
Expand Up @@ -983,11 +983,20 @@ def sh(*cmd, &block)
rake_check_options options, :noop, :verbose
rake_output_message cmd.join(" ") if options[:verbose]
unless options[:noop]
res = system(*cmd)
res = rake_system(*cmd)
block.call(res, $?)
end
end

def rake_system(*cmd)
if Rake.application.windows? && cmd.size == 1
system "call #{cmd.first}"
else
system(*cmd)
end
end
private :rake_system

# Run a Ruby interpreter with the given arguments.
#
# Example:
Expand Down

0 comments on commit 9981a2f

Please sign in to comment.