Show GitHub API error

This commit is contained in:
Jay Trees 2022-01-27 12:53:54 +01:00
parent 82402aca98
commit e230d7ab2b

View file

@ -83,6 +83,7 @@ if ($options) {
use Github\Client;
if ($options) {
try {
$client = new Client();
$release = $client->api('repo')->releases()->latest('grandeljay', 'wishthis');
$tag = $release['tag_name'];
@ -91,6 +92,9 @@ if ($options) {
if (-1 === version_compare($options->version, $version)) {
$options->updateAvailable = true;
}
} catch (\Github\Exception\RuntimeException $th) {
echo $th->getMessage();
}
}
/**