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:
parent
c3c4ae0c5c
commit
aa4d8ffcd3
2 changed files with 5 additions and 3 deletions
|
@ -1,5 +1,7 @@
|
||||||
*SVN*
|
*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]
|
* Add :env option to 'run' (and friends) so that you can specify environment variables to be injected into the new process' environment [Mathieu Lajugie]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -272,9 +272,9 @@ module Capistrano
|
||||||
if Capistrano::SFTP && options.fetch(:sftp, true)
|
if Capistrano::SFTP && options.fetch(:sftp, true)
|
||||||
execute_on_servers(options.merge(:once => true)) do |servers|
|
execute_on_servers(options.merge(:once => true)) do |servers|
|
||||||
logger.debug "downloading #{servers.first}:#{remote_path} to #{path}"
|
logger.debug "downloading #{servers.first}:#{remote_path} to #{path}"
|
||||||
sessions[servers.first].sftp.connect do |tsftp|
|
sftp = sessions[servers.first].sftp
|
||||||
tsftp.get_file remote_path, path
|
sftp.connect unless sftp.state == :open
|
||||||
end
|
sftp.get_file remote_path, path
|
||||||
logger.trace "download finished"
|
logger.trace "download finished"
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue