Skip to content

Commit

Permalink
Merge pull request #2 from phpro/improve-shell
Browse files Browse the repository at this point in the history
Load Phar directly from PHP in shell mode
  • Loading branch information
veewee authored Dec 20, 2019
2 parents b9429f0 + c597994 commit aaabda1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 10 additions & 2 deletions grumphp
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
#!/usr/bin/env bash
$(which php) "$(dirname "$0")/grumphp.phar" "$@"
#!/usr/bin/env php
<?php
if (!in_array('phar', stream_get_wrappers(), true)) {
throw new \RuntimeException(
'GrumPHP-shim requires PHAR to be enabled. Please enable the extension or use the regular GrumPHP version.'
);
}

require 'phar://grumphp.phar/.box/bin/check-requirements.php';
require 'phar://grumphp.phar/bin/grumphp';
2 changes: 0 additions & 2 deletions grumphp.bat

This file was deleted.

0 comments on commit aaabda1

Please sign in to comment.