diff --git a/src/Composer/Json/JsonFile.php b/src/Composer/Json/JsonFile.php index 3aeadc60f..8950545d2 100644 --- a/src/Composer/Json/JsonFile.php +++ b/src/Composer/Json/JsonFile.php @@ -58,6 +58,9 @@ class JsonFile )); $json = file_get_contents($this->path, false, $context); + if (!$json) { + throw new \RuntimeException('Could not read '.$this->path.', you are probably offline'); + } return static::parseJson($json); }