public
Description: Remote multi-server automation tool
Homepage: http://www.capify.org
Clone URL: git://github.com/jamis/capistrano.git
Make sure the invoke task gives a sane error if the COMMAND value is 
omitted (closes #8827)


git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@7204 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
jamis (author)
Sat Jul 21 14:33:43 -0700 2007
commit  f77c785f38c14b5dc390e1c89a8a86522d148cd1
tree    1a56fdccd681a2811f73901adf5e1b32a235de99
parent  86edb6912d1c4f8adbdc2cb88f5d5c85378b4e9d
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 *SVN*
0
 
0
+* Make sure the invoke task gives a sane error when the COMMAND value is omitted [halorgium]
0
+
0
 * Make sure variables are conditionally set in the deploy recipes, so as not to clobber values set elsewhere [Jamis Buck]
0
 
0
 * Fix "input stream is empty" errors from HighLine on prompt [Jamis Buck]
...
15
16
17
 
 
18
19
 
20
21
22
...
15
16
17
18
19
20
 
21
22
23
24
0
@@ -15,8 +15,10 @@ desc <<-DESC
0
     $ cap ROLES=app,web SUDO=1 COMMAND="tail -f /var/log/messages" invoke
0
 DESC
0
 task :invoke do
0
+ command = ENV["COMMAND"] || ""
0
+ abort "Please specify a command to execute on the remote servers (via the COMMAND environment variable)" if command.empty?
0
   method = ENV["SUDO"] ? :sudo : :run
0
- invoke_command(ENV["COMMAND"], :via => method)
0
+ invoke_command(command, :via => method)
0
 end
0
 
0
 desc <<-DESC

Comments

    No one has commented yet.