<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -6,7 +6,8 @@ class Noober::Command::SparkleInstallCommand &lt; Noober::Command::BaseCommand
     @app_name     = app_name
   end
   
-  def run
+  def run options = {}
+    return true if skip?(options)
     download_url = Sparkleology::LatestVersionCommand.new(rss_feed_url).run
     filename = File.basename download_url
     in_safe_dir do
@@ -15,10 +16,22 @@ class Noober::Command::SparkleInstallCommand &lt; Noober::Command::BaseCommand
     end
   end
   
+  def skip? options = {}
+    options[:force] || File.exists?(app_target_path)
+  end
+  
   protected
   
   def fetch_file download_url, save_filename
     open(save_filename,&quot;w&quot;).write(open(download_url).read)
   end
   
+  def applications_path
+    # The ENV['APPLICATIONS_PATH'] override is used for testing
+    ENV['APPLICATIONS_PATH'] || &quot;/Applications&quot;
+  end
+  
+  def app_target_path
+    File.join applications_path, app_name
+  end
 end</diff>
      <filename>lib/noober/command/sparkle_install_command.rb</filename>
    </modified>
    <modified>
      <diff>@@ -25,6 +25,19 @@ class TestSparkleInstallCommand &lt; Test::Unit::TestCase
         should &quot;pass expectations&quot; do; end
         should_not_be_skipped &quot;if run again&quot;
       end
+      
+      context &quot;but application already exists&quot; do
+        setup do
+          `touch #{File.join(test_applications_path, 'SomeAppZip.app')}`
+          Sparkleology::LatestVersionCommand.any_instance.expects(:run).never
+          Noober::Command::AppInstallCommand.any_instance.expects(:run).never
+          @command.run
+        end
+
+        should_have_application &quot;SomeAppZip.app&quot;
+        should_be_skipped &quot;if run again&quot;
+      end
+      
     end
     
   end</diff>
      <filename>test/test_sparkle_install_command.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b64905e8f25c0cf6de9be06cfda4a146ac8ef6c9</id>
    </parent>
  </parents>
  <author>
    <name>Dr Nic Williams</name>
    <email>drnicwilliams@gmail.com</email>
  </author>
  <url>http://github.com/bjeanes/noober/commit/f7f65344e3bd72d2dee7f26e3863db39c94c4485</url>
  <id>f7f65344e3bd72d2dee7f26e3863db39c94c4485</id>
  <committed-date>2008-09-21T01:36:26-07:00</committed-date>
  <authored-date>2008-09-21T01:36:26-07:00</authored-date>
  <message>sparkle_install doesn't run if app already exists; assume that Sparkle will manage the upgrades itself</message>
  <tree>be42793383539b6f5170b1821709c796882be637</tree>
  <committer>
    <name>Dr Nic Williams</name>
    <email>drnicwilliams@gmail.com</email>
  </committer>
</commit>
