1
0
Fork 0

Make phar build fails more debuggable

pull/1681/head
Jordi Boggiano 2013-03-10 13:58:49 +01:00
parent 7ae0dd2a2a
commit cfc8bf0730
2 changed files with 10 additions and 3 deletions

View File

@ -8,5 +8,10 @@ use Composer\Compiler;
error_reporting(-1); error_reporting(-1);
ini_set('display_errors', 1); ini_set('display_errors', 1);
try {
$compiler = new Compiler(); $compiler = new Compiler();
$compiler->compile(); $compiler->compile();
} catch (\Exception $e) {
echo 'Failed to compile phar: ['.get_class($e).'] '.$e->getMessage().' at '.$e->getFile().':'.$e->getLine();
exit(1);
}

View File

@ -58,7 +58,9 @@ class AllFunctionalTest extends \PHPUnit_Framework_TestCase
$proc = new Process('php '.escapeshellarg(__DIR__.'/../../../bin/compile')); $proc = new Process('php '.escapeshellarg(__DIR__.'/../../../bin/compile'));
$exitcode = $proc->run(); $exitcode = $proc->run();
$this->assertSame(0, $exitcode); if ($exitcode !== 0 || trim($proc->getOutput())) {
$this->fail($proc->getOutput());
}
$this->assertTrue(file_exists(self::$pharPath)); $this->assertTrue(file_exists(self::$pharPath));
} }