Skip to content
Browse files

Ticket 76 - FIX: problem with slashes replacement on windows plataforms

  • Loading branch information...
1 parent 5a5195d commit e043519f6b7c0236ae7ca0db280a281b67fde09d Rafa G committed with leehambley Aug 10, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/capistrano/recipes/deploy/strategy/base.rb
View
2 lib/capistrano/recipes/deploy/strategy/base.rb
@@ -50,7 +50,7 @@ def method_missing(sym, *args, &block)
def system(*args)
cmd = args.join(' ')
if RUBY_PLATFORM =~ /win32/
- cmd.gsub!('/','\\') # Replace / with \\
+ cmd = cmd.split(/\s+/).collect {|w| w.match(/^[\w+]+:\/\//) ? w : w.gsub('/', '\\') }.join(' ') # Split command by spaces, change / by \\ unless element is a some+thing://
cmd.gsub!(/^cd /,'cd /D ') # Replace cd with cd /D
cmd.gsub!(/&& cd /,'&& cd /D ') # Replace cd with cd /D
logger.trace "executing locally: #{cmd}"

0 comments on commit e043519

Please sign in to comment.
Something went wrong with that request. Please try again.