<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -10,13 +10,19 @@ unless File.exist?(File.join(ENV['TM_PROJECT_DIRECTORY'],'Capfile'))
   TextMate::exit_show_html &quot;Couldn't find a Capfile in #{ENV['TM_PROJECT_DIRECTORY']}.&quot;
 end
 
+unless ARGV[0]
+  TextMate::exit_show_html &quot;No target specified.&quot;
+end
+
 target = ''
 multistage_dir = File.join(ENV['TM_PROJECT_DIRECTORY'],'config','deploy')
 if File.directory?(multistage_dir)
   stages = Dir.entries(multistage_dir).select{|x| x.match(/\.rb$/)}.collect{|x| x.gsub(/\.rb$/,'')}
-  dialog = `CocoaDialog dropdown --title &quot;Multistage&quot; --no-newline --text &quot;Please select a stage.&quot; --items &quot;#{stages.join('&quot; &quot;')}&quot; --button1 &quot;OK&quot;`
-  (button,selected) = dialog.split(/\n/)
-  target = stages[selected.to_i] + ' '
+  if stages.any?
+    dialog = `CocoaDialog dropdown --title &quot;Multistage&quot; --no-newline --text &quot;Please select a stage.&quot; --items &quot;#{stages.join('&quot; &quot;')}&quot; --button1 &quot;OK&quot;`
+    (button,selected) = dialog.split(/\n/)
+    target = stages[selected.to_i] + ' '
+  end
 end
 target += ARGV[0]
 </diff>
      <filename>Support/rallycap.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b0e8cfb4e1c5433aff01d3369922a0753a1ab5dc</id>
    </parent>
  </parents>
  <author>
    <name>Mark Cornick</name>
    <email>mcornick@mcornick.com</email>
  </author>
  <url>http://github.com/vigetlabs/capistrano-tmbundle/commit/ae550d5b4fd7699787940e108af8e73742db02cf</url>
  <id>ae550d5b4fd7699787940e108af8e73742db02cf</id>
  <committed-date>2008-06-17T12:23:38-07:00</committed-date>
  <authored-date>2008-06-17T12:23:38-07:00</authored-date>
  <message>handle some unlikely but still potential error scenarios</message>
  <tree>c4f0103250c915b004e012e3d80a81c403f3d5ff</tree>
  <committer>
    <name>Mark Cornick</name>
    <email>mcornick@mcornick.com</email>
  </committer>
</commit>
