Fixed bin/gpm selfupgrade failing to report failed Grav update [#3116]

This commit is contained in:
Matias Griese
2021-01-20 10:33:11 +02:00
parent 3a31d54600
commit 6992d52767
2 changed files with 3 additions and 3 deletions

View File

@@ -5,6 +5,7 @@
* Fixed fatal error when `site.taxonomies` contains a bad value
* Sanitize valid Page extensions from `Page::template_format()`
* Fixed `bin/gpm index` erroring out [#3158](https://github.com/getgrav/grav/issues/3158)
* Fixed `bin/gpm selfupgrade` failing to report failed Grav update [#3116](https://github.com/getgrav/grav/issues/3116)
# v1.7.0
## 01/19/2021

View File

@@ -255,13 +255,12 @@ class SelfupgradeCommand extends GpmCommand
$this->upgradeGrav($this->file, $folder);
$errorCode = Installer::lastErrorCode();
if ($this->tmp) {
Folder::delete($this->tmp);
}
if ($errorCode & (Installer::ZIP_OPEN_ERROR | Installer::ZIP_EXTRACT_ERROR)) {
$errorCode = Installer::lastErrorCode();
if ($errorCode) {
$io->write("\x0D");
// extra white spaces to clear out the buffer properly
$io->writeln(' |- Installing upgrade... <red>error</red> ');