Skip to content

Commit

Permalink
Merge pull request #88 from esurov/phar-readonly
Browse files Browse the repository at this point in the history
Added a check for `phar.readonly`
  • Loading branch information
marcocesarato authored May 7, 2023
2 parents 21e706e + da77266 commit dd200a7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ if (file_exists($output . '.gz')) {
if (file_exists($finalOutput)) {
unlink($finalOutput);
}

// check that phar.readonly to off
if (1 == ini_get('phar.readonly')) {
echo "Can't create a Phar file. Please set `phar.readonly = Off` in your php.ini\n";
exit(1);
}

// create phar
$p = new Phar($output);

Expand Down

0 comments on commit dd200a7

Please sign in to comment.