1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Make sure Actor#get does not close the SFTP connection

git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@6151 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jamis Buck 2007-02-15 15:46:19 +00:00
parent c3c4ae0c5c
commit aa4d8ffcd3
2 changed files with 5 additions and 3 deletions

View file

@ -1,5 +1,7 @@
*SVN*
* Make sure Actor#get does not close the SFTP channel (so subsequent SFTP operations work) [Dov Murik]
* Add :env option to 'run' (and friends) so that you can specify environment variables to be injected into the new process' environment [Mathieu Lajugie]

View file

@ -272,9 +272,9 @@ module Capistrano
if Capistrano::SFTP && options.fetch(:sftp, true)
execute_on_servers(options.merge(:once => true)) do |servers|
logger.debug "downloading #{servers.first}:#{remote_path} to #{path}"
sessions[servers.first].sftp.connect do |tsftp|
tsftp.get_file remote_path, path
end
sftp = sessions[servers.first].sftp
sftp.connect unless sftp.state == :open
sftp.get_file remote_path, path
logger.trace "download finished"
end
else