Skip to content

Commit

Permalink
Allow executing tasks only defined in default stage without having to…
Browse files Browse the repository at this point in the history
… 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 committed Jul 3, 2008
1 parent 33ac074 commit 0722f3d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/capistrano/ext/multistage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
end
end

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
Expand Down

0 comments on commit 0722f3d

Please sign in to comment.