From 892a60c57461176dd7acc60d4f10c1291788aba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Huet?= Date: Mon, 5 Jan 2015 14:30:41 +0100 Subject: [PATCH] Allow for both ways to find composer's autoload --- bin/mage | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/mage b/bin/mage index 2f316e4..986bafb 100755 --- a/bin/mage +++ b/bin/mage @@ -16,7 +16,9 @@ $baseDir = dirname(dirname(__FILE__)); define('MAGALLANES_VERSION', '1.0.3'); define('MAGALLANES_DIRECTORY', $baseDir); -if (file_exists(__DIR__ . '/../../../autoload.php')) { +if (file_exists(__DIR__ . '/../vendor/autoload.php')) { + require_once __DIR__ . '/../vendor/autoload.php'; +} else if (file_exists(__DIR__ . '/../../../autoload.php')) { require_once __DIR__ . '/../../../autoload.php'; } else { require_once $baseDir . '/Mage/Autoload.php';