Skip to content

Commit ca4d275

Browse files
committed
🎨 updated package details
1 parent bf8496e commit ca4d275

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Utils/Package.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,13 @@ public static function version()
3434
*/
3535
public static function ltsInfo()
3636
{
37-
$package = json_decode(
38-
file_get_contents("https://repo.packagist.org/p2/leafs/cli.json")
39-
);
37+
$data = file_get_contents("https://repo.packagist.org/p2/leafs/cli.json");
38+
39+
if (!$data) {
40+
return static::info();
41+
}
42+
43+
$package = json_decode($data);
4044

4145
return $package->packages->{"leafs/cli"}[0];
4246
}

0 commit comments

Comments
 (0)