Skip to content

Commit dd200a7

Browse files
Merge pull request #88 from esurov/phar-readonly
Added a check for `phar.readonly`
2 parents 21e706e + da77266 commit dd200a7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bin/build

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ if (file_exists($output . '.gz')) {
2727
if (file_exists($finalOutput)) {
2828
unlink($finalOutput);
2929
}
30+
31+
// check that phar.readonly to off
32+
if (1 == ini_get('phar.readonly')) {
33+
echo "Can't create a Phar file. Please set `phar.readonly = Off` in your php.ini\n";
34+
exit(1);
35+
}
36+
3037
// create phar
3138
$p = new Phar($output);
3239

0 commit comments

Comments
 (0)