Skip to content

Commit

Permalink
Only replace "cd " with "cd /D ", to avoid replacing possible command…
Browse files Browse the repository at this point in the history
…s that begin with cd
  • Loading branch information
esad committed Nov 7, 2008
1 parent 4996e54 commit 0b5615a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/capistrano/recipes/deploy/strategy/base.rb
Expand Up @@ -51,8 +51,8 @@ def system(*args)
cmd = args.join(' ')
if RUBY_PLATFORM =~ /win32/
cmd.gsub!('/','\\') # Replace / with \\
cmd.gsub!(/^cd/,'cd /D') # Replace cd with cd /D
cmd.gsub!(/&& cd/,'&& cd /D') # Replace cd with cd /D
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}"
super(cmd)
else
Expand Down

0 comments on commit 0b5615a

Please sign in to comment.