Skip to content

Commit

Permalink
Ticket capistrano#193 - Don't check if task already defined
Browse files Browse the repository at this point in the history
It's done in task method(line 95) and not needed in alias_task
  • Loading branch information
rgo committed Nov 5, 2011
1 parent 3022a46 commit ce70379
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/capistrano/configuration/namespaces.rb
Expand Up @@ -104,13 +104,10 @@ def task(name, options={}, &block)
end

def define_task(task)
task_already_defined = tasks.key?(task.name)
tasks[task.name] = task

if !task_already_defined
metaclass = class << self; self; end
metaclass.send(:define_method, task.name) { execute_task(tasks[task.name]) }
end
metaclass = class << self; self; end
metaclass.send(:define_method, task.name) { execute_task(tasks[task.name]) }
end

# Find the task with the given name, where name is the fully-qualified
Expand Down

0 comments on commit ce70379

Please sign in to comment.