Skip to content

Commit f2efa33

Browse files
committed
Check that we can write phar in build script
1 parent 5f7ead1 commit f2efa33

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

build.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22

33
// Check we have dev tools
44
if ( !file_exists( __DIR__ . '/vendor/bin/php-generate-autoload' ) ) {
5-
echo "Please install dev tools with:\n\n$ composer install\n";
5+
echo "Please install dev tools with:\n";
6+
echo "$ composer install\n";
7+
exit(1);
8+
}
9+
10+
// Check we can write phar
11+
if ( !Phar::canWrite() ) {
12+
echo "Can not write phar please run build script with:\n";
13+
echo "$ php -d phar.readonly=0 {$argv[0]}\n";
614
exit(1);
715
}
816

0 commit comments

Comments
 (0)