fix(generator): Fix charset used in file comparison

This commit is contained in:
Daniel Azuma 2021-01-02 12:29:57 -08:00 committed by GitHub
parent 4a8803cb22
commit 25546fd45b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ module Google
version_content = changelog_content = nil
generator_result.files.each do |path, content|
full_path = File.join(base_dir, path)
old_content = File.binread(full_path) if File.readable?(full_path)
old_content = File.read(full_path) if File.readable?(full_path)
if path == generator_result.version_path
version_content = old_content || content
elsif path == generator_result.changelog_path