From: Michael Wallner Date: Thu, 5 Mar 2015 08:12:26 +0000 (+0100) Subject: do not exit on compression failure X-Git-Tag: v1.1.0~13 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;ds=sidebyside;h=fda687da4dad697df7d06753ade76014a5899599;hp=3dfe0bf2f02bbcf39a3b137913823c62fa03b694;p=pharext%2Fpharext do not exit on compression failure --- diff --git a/bin/pharext b/bin/pharext index aa352e6..1d0ed19 100755 Binary files a/bin/pharext and b/bin/pharext differ diff --git a/src/pharext/Packager.php b/src/pharext/Packager.php index 4379bb6..a848e2d 100644 --- a/src/pharext/Packager.php +++ b/src/pharext/Packager.php @@ -158,13 +158,21 @@ class Packager implements Command } if ($this->args->gzip) { $this->info("Compressing with gzip ... "); - $package->compress(Phar::GZ); - $this->info("OK\n"); + try { + $package->compress(Phar::GZ); + $this->info("OK\n"); + } catch (\Exception $e) { + $this->error("%s\n", $e->getMessage()); + } } if ($this->args->bzip) { $this->info("Compressing with bzip ... "); - $package->compress(Phar::BZ2); - $this->info("OK\n"); + try { + $package->compress(Phar::BZ2); + $this->info("OK\n"); + } catch (\Exception $e) { + $this->error("%s\n", $e->getMessage()); + } } unset($package);