Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

#system_path had problems combining long and fragmented PATHs #4

Merged
merged 1 commit into from

2 participants

@gitkeeper

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!

@nilbus

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
@nilbus

capistrano-window-server 0.6.1 with this fix pushed to rubygems.org

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 authored
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
View
8 lib/capistrano/ext/windows_server.rb
@@ -20,11 +20,13 @@ def latest_release
strip_cygdrive current_path
end
+ # 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
end
task :path do
Something went wrong with that request. Please try again.