Permalink
Browse files

Ensure PHP-Scoper can only be called from the CLI (#220)

  • Loading branch information...
theofidry committed Jun 9, 2018
1 parent a503f54 commit 5ff91b875e1aef57dd5197b4d59a50d709be85ef
Showing with 6 additions and 0 deletions.
  1. +6 −0 bin/php-scoper
View
@@ -17,6 +17,12 @@ use Isolated\Symfony\Component\Finder\Finder as IsolatedFinder;
use RuntimeException;
use Symfony\Component\Finder\Finder;
if (PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg') {
echo PHP_EOL.'PHP-Scoper may only be invoked from a command line'.\PHP_EOL;
exit(1);
}
$findAutoload = function () {
if (file_exists($autoload = __DIR__.'/../../../autoload.php')) {
// Is installed via composer

0 comments on commit 5ff91b8

Please sign in to comment.