From 7ef6aa2581bce7a71dcc4f0a202aff6ab60fb7b8 Mon Sep 17 00:00:00 2001 From: Christopher Vagnetoft Date: Fri, 6 Apr 2018 01:31:22 +0200 Subject: [PATCH] Misc fixes --- .gitignore | 1 + bin/pharlite | 9 +++++++-- src/Builder.php | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ff72e2d..d222476 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /composer.lock /vendor +/*.phar diff --git a/bin/pharlite b/bin/pharlite index 404ba8a..53299b9 100755 --- a/bin/pharlite +++ b/bin/pharlite @@ -1,7 +1,12 @@ #!/usr/bin/env php build(); \ No newline at end of file +$builder->build(); diff --git a/src/Builder.php b/src/Builder.php index e957317..5d44103 100644 --- a/src/Builder.php +++ b/src/Builder.php @@ -150,6 +150,9 @@ class Builder $phar->addFromString($bin, $str); } } else { + if (count($bins)) { + $index = array_shift($bins); + } $indexFile = file_get_contents($index); $indexFile = $this->stripShebang($indexFile); $index = "bootstrap.php";