Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 0722f3d2a090d4b426af7a81c0fc82d23555d266 1 parent 33ac074
authored July 03, 2008

Showing 1 changed file with 6 additions and 0 deletions. Show diff stats Hide diff stats

  1. 6  lib/capistrano/ext/multistage.rb
6  lib/capistrano/ext/multistage.rb
@@ -17,6 +17,12 @@
17 17
     end 
18 18
   end 
19 19
 
  20
+  on :load do
  21
+    unless stages.include?(ARGV.first) # don't need to do anything if stage was specified
  22
+      find_and_execute_task(default_stage) if exists?(:default_stage)
  23
+    end
  24
+  end
  25
+
20 26
   namespace :multistage do
21 27
     desc "[internal] Ensure that a stage has been selected."
22 28
     task :ensure do

0 notes on commit 0722f3d

Please sign in to comment.
Something went wrong with that request. Please try again.