aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/pull.rb
diff options
context:
space:
mode:
authorAndrew Janke2016-03-09 23:36:23 -0500
committerXu Cheng2016-03-13 14:32:05 +0800
commit23ee1ee49957b4c5369bec9ea336006f40e44270 (patch)
treecd50d9b6452f03c6866df57e7dd18042ba6d7090 /Library/Homebrew/cmd/pull.rb
parentad5ee6a3f120ce6daddab80e2ac4a776bbd7e40a (diff)
downloadbrew-23ee1ee49957b4c5369bec9ea336006f40e44270.tar.bz2
brew pull: fix encoding of `brew info --json` output
Fixes Homebrew/homebrew#49757 Closes Homebrew/homebrew#49775 Closes Homebrew/homebrew#49947. Signed-off-by: Andrew Janke <andrew@apjanke.net>
Diffstat (limited to 'Library/Homebrew/cmd/pull.rb')
-rw-r--r--Library/Homebrew/cmd/pull.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/pull.rb b/Library/Homebrew/cmd/pull.rb
index eef2d41ee..26c8cf522 100644
--- a/Library/Homebrew/cmd/pull.rb
+++ b/Library/Homebrew/cmd/pull.rb
@@ -321,6 +321,7 @@ module Homebrew
def current_versions_from_info_external(formula_name)
versions = {}
json = Utils.popen_read(HOMEBREW_BREW_FILE, "info", "--json=v1", formula_name)
+ json.force_encoding("UTF-8") if json.respond_to?(:force_encoding)
if $?.success?
info = Utils::JSON.load(json)
[:stable, :devel, :head].each do |vertype|