Skip to content


Subversion checkout URL

You can clone with
Download ZIP


#system_path had problems combining long and fragmented PATHs #4

merged 1 commit into from

2 participants


Hi SciMed,

While working with your Capistrano extension on a Windows 2008 r2 server I've noticed a small problem with #system_path:

The PATH variable on the server is very long and the SSH client fragmented the output of echo $PATH into multiple parts. #system_path wasn't able to combine/concatenate them and I was confronted with a lot of errors because of it.

I fixed it quickly for me but I thought I let you know. Thanks anyway for saving me some time deploying on those awful Windows boxes!


Thanks, and I'm glad it has been useful to you! You are absolutely right about the streaming output - good catch.

@nilbus nilbus merged commit f99d85a into SciMed:master

capistrano-window-server 0.6.1 with this fix pushed to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 1, 2012
  1. #system_path can now combine longer and fragmented PATHs

    Alexander Baumann committed
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/capistrano/ext/windows_server.rb
8 lib/capistrano/ext/windows_server.rb
@@ -20,11 +20,13 @@ def latest_release
strip_cygdrive current_path
+ # Probably not compatible with multiple roles with different PATHs
def system_path
return @system_path if @system_path
- run 'echo "/bin:/usr/bin:$PATH"' do |channel, stream, data|
- return @system_path = data.strip # Probably not compatible with multiple roles with different PATHs
- end
+ @system_path = "/bin:" + "/usr/bin:"
+ run 'echo $PATH' { |channel, stream, data| @system_path << data.strip }
+ @system_path
task :path do
Something went wrong with that request. Please try again.