我的问题类似于如何从另一个调用 Capistrano 任务?
我想要的额外的事情是能够在从 foo 调用它时将参数传递给 bar:
task :foo do
# this calls bar, I would like to pass params (i.e n = 10)
# as if I were calling cap bar -s n=10
# bar does not take arguments
bar
end
task :bar do
if exists?(:n)
puts "n is: #{n}"
end
end