1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-29 02:02:40 +01:00

Pass the file contents instead of the file path to phutil_json_decode.

Summary: See D9681#22.

Test Plan: Created an empty `.git/arc/config` file... no exception was thrown.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9704
This commit is contained in:
Joshua Spence 2014-06-24 11:40:04 +10:00
parent 750a94e89f
commit 108a4dc9e6

View file

@ -311,7 +311,8 @@ final class ArcanistWorkingCopyIdentity {
$local_path));
try {
return phutil_json_decode($local_path);
$json = Filesystem::readFile($local_path);
return phutil_json_decode($json);
} catch (PhutilJSONParserException $ex) {
throw new PhutilProxyException(
pht("Failed to parse '%s' as JSON.", $local_path),