Skip to content

Commit

Permalink
User simpler stub
Browse files Browse the repository at this point in the history
Better error message if zlib is not compiled in (any recent PHP has it
in).
  • Loading branch information
slusarz committed Oct 19, 2013
1 parent cf04b9b commit 2d29916
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion maintainer-tools/horde-installer-phar-create
Expand Up @@ -66,7 +66,13 @@ class HordeCreatePharInstaller
$phar->setSignatureAlgorithm(Phar::SHA1);

$phar->buildFromDirectory($this->_build);
$phar->setStub($phar->createDefaultStub('installer.php'));
$phar->setStub(
'<?php ' .
'if (!extension_exists("zlib")) { exit("The installer requires the zlib library to be compiled into PHP."); }' .
'Phar::mapPhar("installer.phar");' .
'require "phar://installer.phar/installer.php";' .
'__HALT_COMPILER(); ?>'
);

$phar->compressFiles(Phar::GZ);
}
Expand Down

0 comments on commit 2d29916

Please sign in to comment.