Manually copy the file instead of asking Thor to do it

This commit is contained in:
Thomas Reynolds 2013-01-02 16:40:42 -08:00
parent aefcdabb52
commit 7cd6cd233e
2 changed files with 13 additions and 2 deletions

View file

@ -1,4 +1,5 @@
require "middleman-core"
require "fileutils"
# CLI Module
module Middleman::Cli
@ -118,7 +119,17 @@ module Middleman::Cli
output_file = File.join(build_dir, resource.destination_path)
if resource.binary?
copy_file(resource.source_file, output_file)
if !File.exists?(output_file)
say_status :create, output_file, :green
elsif FileUtils.compare_file(resource.source_file, output_file)
say_status :identical, output_file, :blue
return output_file
else
say_status :update, output_file, :yellow
end
FileUtils.mkdir_p(File.dirname(output_file))
FileUtils.cp(resource.source_file, output_file)
else
begin
response = self.class.shared_rack.get(URI.escape(resource.destination_path))

View file

@ -1,5 +1,5 @@
module Middleman
# Current Version
# @return [String]
VERSION = '3.0.8.pre.1' unless const_defined?(:VERSION)
VERSION = '3.0.8.pre.2' unless const_defined?(:VERSION)
end