Skip to content
Browse files

ammending cli bootstrap so only kicks in if it is called directly

  • Loading branch information...
1 parent 465041a commit 659126bb228939315b9c3fc136de53ff86d454fd Jonthan Moss committed May 24, 2011
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/bootstrap.php
View
7 src/bootstrap.php
@@ -5,8 +5,9 @@
*/
Phar::mapPhar();
-
-if (php_sapi_name() == 'cli' && isset ($argv[0])) {
+if (php_sapi_name() == 'cli'
+ && isset ($argv[0])
+ && $argv[0] == basename(__FILE__)) {
$runner = new CliRunner();
$runner->processParameters($argv);
} else {
@@ -189,4 +190,4 @@ private function printHelp()
}
-__HALT_COMPILER();
+__HALT_COMPILER();

0 comments on commit 659126b

Please sign in to comment.
Something went wrong with that request. Please try again.