From 6f4f25db9d8b52b612752509600272ede4a95ed9 Mon Sep 17 00:00:00 2001 From: Tom Rochette Date: Sun, 9 Oct 2016 12:56:51 -0400 Subject: [PATCH] Exit from do-while if we've found a composer.json in bin/box. --- bin/box | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/box b/bin/box index 352a3bed..1d522f23 100755 --- a/bin/box +++ b/bin/box @@ -13,7 +13,7 @@ if (extension_loaded('phar') && ($uri = Phar::running())) { } elseif (class_exists('Extract')) { require __DIR__ . '/../src/vendors/autoload.php'; } else { - loadComposerClassloader(realpath($_SERVER['argv'][0])); + loadComposerClassloader(realpath($_SERVER['argv'][0]), 1); } $app = new KevinGH\Box\Application(); @@ -45,6 +45,7 @@ function loadComposerClassloader($dir = null, $skip = 0) } $path = realpath("$dir/composer.json"); + break; } } while ($dir !== ($up = dirname($dir)));