From: Christian Weiske Date: Thu, 27 Jul 2017 19:52:05 +0000 (+0200) Subject: Try absolute autoloader path first X-Git-Tag: v0.2.1~1 X-Git-Url: https://git.cweiske.de/php-sqllint.git/commitdiff_plain/c50fe3de58444031d1e1ea4bff50ffde85a366be Try absolute autoloader path first Resolves: https://github.com/cweiske/php-sqllint/issues/11 --- diff --git a/bin/php-sqllint b/bin/php-sqllint index 8075c9e..fd766bc 100755 --- a/bin/php-sqllint +++ b/bin/php-sqllint @@ -13,12 +13,12 @@ */ namespace phpsqllint; -if (file_exists('vendor/autoload.php')) { - //dependency composer installation - include_once 'vendor/autoload.php'; -} else if (file_exists(__DIR__ . '/../vendor/autoload.php')) { +if (file_exists(__DIR__ . '/../vendor/autoload.php')) { //local git checkout include_once __DIR__ . '/../vendor/autoload.php'; +} else if (file_exists('vendor/autoload.php')) { + //dependency composer installation + include_once 'vendor/autoload.php'; } if (file_exists(__DIR__ . '/../src/phpsqllint/Autoloader.php')) {