lib/remote_file_target.rb in sprout-0.5.13 vs lib/remote_file_target.rb in sprout-0.5.15

- old
+ new

@@ -18,20 +18,22 @@ def resolve # already run once, don't run again in this session if(!file_name.nil?) return end - if(url.nil? || url == '') - return - end @file_name = url.split('/').pop @downloaded_path = File.join(Sprout.cache, type, install_path, file_name) if(archive_type == 'txt' || archive_type == 'exe') @install_path = File.join(Sprout.cache, type, install_path) else @install_path = File.join(Sprout.cache, type, install_path, archive_type) end @copy_path = File.join(install_path, archive_path) + + if(url.nil? || url == '') + return + end + loader = RemoteFileLoader.new if(Sprout.update || !File.exists?(downloaded_path)) # retrieve from the network loader.get_remote_file(url, downloaded_path)