mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
If subversion asks for a password, prompt as a last resort (closes #9885)
git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@8754 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
917509832b
commit
9e2de79a38
2 changed files with 9 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
|||
*SVN*
|
||||
|
||||
* If subversion asks for a password, prompt as a last resort [Jamis Buck]
|
||||
|
||||
* Use checkout --lightweight for bzr checkout, instead of branch [michiels]
|
||||
|
||||
* Make sure bzr SCM works when revision is head (or unspecified) [michiels]
|
||||
|
|
|
@ -72,7 +72,7 @@ module Capistrano
|
|||
case text
|
||||
when /\bpassword.*:/i
|
||||
# subversion is prompting for a password
|
||||
"#{variable(:scm_password) || variable(:password)}\n"
|
||||
"#{scm_password_prompt}\n"
|
||||
when %r{\(yes/no\)}
|
||||
# subversion is asking whether or not to connect
|
||||
"yes\n"
|
||||
|
@ -107,6 +107,12 @@ module Capistrano
|
|||
def verbose
|
||||
variable(:scm_verbose) ? nil : "-q"
|
||||
end
|
||||
|
||||
def scm_password_prompt
|
||||
@scm_password_prompt ||= variable(:scm_password) ||
|
||||
variable(:password) ||
|
||||
Capistrano::CLI.password_prompt("Subversion password: ")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue