From 738031ec5d1f794c53f5c8bc50b7c1c6a5af1fcd Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sun, 9 Feb 2020 21:29:00 +0000 Subject: [PATCH] Search for autoload.php in different locations --- bin/dmg | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) mode change 100644 => 100755 bin/dmg diff --git a/bin/dmg b/bin/dmg old mode 100644 new mode 100755 index 466e1fa..dee07b1 --- a/bin/dmg +++ b/bin/dmg @@ -7,7 +7,11 @@ use Opdavies\DrupalModuleGenerator\Service\TestNameConverter; use Symfony\Component\Console\Application; use Symfony\Component\Finder\Finder; -require_once __DIR__.'/../vendor/autoload.php'; +if (file_exists(__DIR__.'/../../../autoload.php')) { + require __DIR__.'/../../../autoload.php'; +} else { + require __DIR__.'/../vendor/autoload.php'; +} $app = new Application();