Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address handling binary files on windows systems. #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/rake-pipeline/file_wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def exists?
# expected encoding specified in {#encoding}.
def read
contents = if "".respond_to?(:encode)
File.read(fullpath, :encoding => encoding)
File.read(fullpath, :encoding => encoding, :binmode => (encoding.eql? "BINARY"))
else
File.read(fullpath)
end
Expand All @@ -126,7 +126,7 @@ def create
FileUtils.mkdir_p(File.dirname(fullpath))

@created_file = if "".respond_to?(:encode)
File.open(fullpath, "w:#{encoding}")
File.open(fullpath, "w:#{encoding}", :binmode => (encoding.eql? "BINARY"))
else
File.open(fullpath, "w")
end
Expand Down