From 66687e105ae66727ac3e528ab0f61ff932b86729 Mon Sep 17 00:00:00 2001 From: Dezer Date: Tue, 27 Aug 2024 17:24:15 +0300 Subject: [PATCH] There was a double loading of the autoloader --- bin/grumphp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/grumphp b/bin/grumphp index 957fac152..62c748fe4 100755 --- a/bin/grumphp +++ b/bin/grumphp @@ -8,9 +8,11 @@ use Symfony\Component\Console\Output\ConsoleOutput; (function () { // First load current projects autoloader for smarter global / phar installs .... // A bit opinionated at the moment though: - $autoloaderInWorkingDirectory = getcwd() . '/vendor/autoload.php'; - if (is_file($autoloaderInWorkingDirectory)) { - require_once $autoloaderInWorkingDirectory; + if (getenv('GRUMPHP_ONLY_PROJECT') === false) { + $autoloaderInWorkingDirectory = getcwd() . '/vendor/autoload.php'; + if (is_file($autoloaderInWorkingDirectory)) { + require_once $autoloaderInWorkingDirectory; + } } // Next load the GrumPHP autoloader