Skip to content

Commit

Permalink
For unix-y phar file, always use unix-y line endings
Browse files Browse the repository at this point in the history
When being built under systems having different PHP_EOL than \r,
a phar will be built not working _usually_ under unix-alike system.

Fixes maglnet#281
  • Loading branch information
mfn committed Nov 8, 2021
1 parent 1919192 commit 80c5074
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<!-- ============================================ -->
<target name="phar-build" depends="run-test">
<!--create the package-->
<php expression="file_put_contents('bin/clistub.php', '#!/usr/bin/env php' . PHP_EOL . Phar::createDefaultStub('bin/composer-require-checker.php'))"/>
<php expression="file_put_contents('bin/clistub.php', '#!/usr/bin/env php' . chr(10) . Phar::createDefaultStub('bin/composer-require-checker.php'))"/>
<pharpackage basedir="./"
destfile="${build-dir}/${phing.project.name}.phar"
stub="bin/clistub.php"
Expand Down

0 comments on commit 80c5074

Please sign in to comment.