mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
api: force encoding to UTF-8
This commit is contained in:
parent
d8b96a4385
commit
4c19e11abe
@ -96,7 +96,7 @@ module Homebrew
|
||||
|
||||
mtime = insecure_download ? Time.new(1970, 1, 1) : Time.now
|
||||
FileUtils.touch(target, mtime:) unless skip_download
|
||||
JSON.parse(target.read, freeze: true)
|
||||
JSON.parse(target.read(encoding: Encoding::UTF_8), freeze: true)
|
||||
rescue JSON::ParserError
|
||||
target.unlink
|
||||
retry_count += 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user