From: Dan Brown Date: Sat, 29 Apr 2023 13:13:20 +0000 (+0100) Subject: Added warning to complile when dev deps are installed X-Git-Url: http://source.bookstackapp.com/system-cli/commitdiff_plain/d432aa7395f229feb5e981da7436399089889dbc Added warning to complile when dev deps are installed --- diff --git a/compile.php b/compile.php index 9c51d16..9d137d5 100644 --- a/compile.php +++ b/compile.php @@ -18,6 +18,10 @@ try { unlink($pharFile . '.gz'); } + if (is_dir(__DIR__ . '/vendor/phpunit')) { + throw new Exception("You should only compile when dev dependencies are NOT installed"); + } + // create phar $phar = new Phar($pharFile); @@ -44,9 +48,9 @@ try { $phar->compressFiles(Phar::GZ); # Make the file executable - chmod(__DIR__ . "/{$pharFile}", 0770); + chmod(__DIR__ . "/{$pharFile}", 0775); echo "$pharFile successfully created" . PHP_EOL; } catch (Exception $e) { - echo $e->getMessage(); + echo "ERROR: " . $e->getMessage() . "\n"; }