Merge branch '3.0-stable'
This commit is contained in:
commit
6672c1c324
4 changed files with 35 additions and 2 deletions
|
@ -137,7 +137,7 @@ module Middleman::Cli
|
|||
response = self.class.shared_rack.get(URI.escape(resource.destination_path))
|
||||
|
||||
if response.status == 200
|
||||
create_file(output_file, response.body)
|
||||
create_file(output_file, binary_encode(response.body))
|
||||
else
|
||||
handle_error(output_file, response.body)
|
||||
end
|
||||
|
@ -160,6 +160,13 @@ module Middleman::Cli
|
|||
self.shell.error(response)
|
||||
end
|
||||
end
|
||||
|
||||
def binary_encode(string)
|
||||
if string.respond_to?(:force_encoding)
|
||||
string.force_encoding("ascii-8bit")
|
||||
end
|
||||
string
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue