Matt Zukowski
Matt Zukowski

Reputation: 4541

How do I get the name of the current task in Capistrano 3?

In Capistrano 2.x I could use current_task.name inside a task to get the current task's name. Is there something similar in Capistrano 3?

Upvotes: 1

Views: 1097

Answers (1)

Matt Zukowski
Matt Zukowski

Reputation: 4541

Figured it out:

task :foo do |task|
  current_task_name = task.name_with_args
end

Upvotes: 4

Related Questions