Skip to content

Commit

Permalink
Don't let a task trigger itself when used as the source for an "on" h…
Browse files Browse the repository at this point in the history
…ook (closes #9356)

git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@7381 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
jamis committed Aug 31, 2007
1 parent 095b425 commit 9612dd9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
@@ -1,5 +1,7 @@
*SVN*

* Don't let a task trigger itself when used as the source for an "on" hook [Jamis Buck]

* Avoid using the --password switch with subversion for security purposes [sentinel]

* Add version_dir, current_dir, and shared_dir variables for naming the directories used in deployment [drinkingbird]
Expand Down
4 changes: 4 additions & 0 deletions lib/capistrano/callback.rb
Expand Up @@ -37,5 +37,9 @@ def initialize(config, source, options={})
def call
config.find_and_execute_task(source)
end

def applies_to?(task)
super && (task.nil? || task.fully_qualified_name != source.to_s)
end
end
end

0 comments on commit 9612dd9

Please sign in to comment.