vendor/cache/ruby/2.3.0/gems/capistrano-2.9.0/lib/capistrano/recipes/deploy/strategy/base.rb
# A wrapper for Kernel#system that logs the command being executed.
A wrapper for Kernel#system that logs the command being executed.
A wrapper for Kernel#system that logs the command being executed .
def system(*args)
            cmd = args.join(' ')
            result = nil
            if RUBY_PLATFORM =~ /win32/
							cmd = cmd.split(/\s+/).collect {|w| w.match(/^[\w+]+:\/\//) ? w : w.gsub('/', '\\') }.join(' ') 
              cmd.gsub!(/^cd /,'cd /D ') 
              cmd.gsub!(/&& cd /,'&& cd /D ') 
              logger.trace "executing locally: #{cmd}"
              elapsed = Benchmark.realtime do
                result = super(cmd)
              end
            else
              logger.trace "executing locally: #{cmd}"
              elapsed = Benchmark.realtime do
                result = super
              end
            end
            logger.trace "command finished in #{(elapsed * 1000).round}ms"
            result
          end
def system ( * args ) cmd = args . join ( ' ' ) result = nil if RUBY_PLATFORM =~ / win32 / cmd = cmd . split ( / \s + / ) . collect { | w | w . match ( / ^[ \w +]+: \/ \/ / ) ? w : w . gsub ( '/' , '\\' ) } . join ( ' ' ) cmd . gsub! ( / ^cd  / , 'cd /D ' ) cmd . gsub! ( / && cd  / , '&& cd /D ' ) logger . trace "executing locally: #{cmd}" elapsed = Benchmark . realtime do result = super ( cmd ) end else logger . trace "executing locally: #{cmd}" elapsed = Benchmark . realtime do result = super end end logger . trace "command finished in #{(elapsed * 1000).round}ms" result end
A wrapper for Kernel#system that logs the command being executed.
A wrapper for Kernel#system that logs the command being executed .
# Split command by spaces, change / by \\ unless element is a some+thing://  # Replace cd with cd /D # Replace cd with cd /D
args
<not_specific>