Browse files

Allow executing tasks only defined in default stage without having to…

… specify default stage on cmd line.

For example without this code this does not work: `cap my:task` but this does: `cap production my:task`
Also without this code cap -T will not show tasks required by default stage.
  • Loading branch information...
Michael Hale
Michael Hale committed Jul 3, 2008
1 parent 33ac074 commit 0722f3d2a090d4b426af7a81c0fc82d23555d266
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/capistrano/ext/multistage.rb
@@ -17,6 +17,12 @@
+ on :load do
+ unless stages.include?(ARGV.first) # don't need to do anything if stage was specified
+ find_and_execute_task(default_stage) if exists?(:default_stage)
+ end
+ end
namespace :multistage do
desc "[internal] Ensure that a stage has been selected."
task :ensure do

0 comments on commit 0722f3d

Please sign in to comment.