mirror of
https://github.com/getgrav/grav.git
synced 2026-05-07 06:06:16 +02:00
Better GPM detection of unauthorized installations
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
# v1.7.11
|
||||
## mm/dd/2021
|
||||
|
||||
1. [](#improved)
|
||||
* Better GPM detection of unauthorized installations
|
||||
|
||||
# v1.7.10
|
||||
## 04/06/2021
|
||||
|
||||
|
||||
@@ -600,7 +600,13 @@ class InstallCommand extends GpmCommand
|
||||
try {
|
||||
$output = Response::get($package->zipball_url . $query, [], [$this, 'progress']);
|
||||
} catch (Exception $e) {
|
||||
$error = str_replace("\n", "\n | '- ", $e->getMessage());
|
||||
if (!empty($package->premium) && $e->getCode() === 401) {
|
||||
$message = '<yellow>Unauthorized Premium License Key</yellow>';
|
||||
} else {
|
||||
$message = $e->getMessage();
|
||||
}
|
||||
|
||||
$error = str_replace("\n", "\n | '- ", $message);
|
||||
$io->write("\x0D");
|
||||
// extra white spaces to clear out the buffer properly
|
||||
$io->writeln(' |- Downloading package... <red>error</red> ');
|
||||
|
||||
Reference in New Issue
Block a user