Try absolute autoloader path first
authorChristian Weiske <cweiske@cweiske.de>
Thu, 27 Jul 2017 19:52:05 +0000 (21:52 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 27 Jul 2017 19:52:05 +0000 (21:52 +0200)
Resolves: https://github.com/cweiske/php-sqllint/issues/11

bin/php-sqllint

index 8075c9e636300e20bc2f555baecbcfaab5a99efc..fd766bc07ce6766eed48fa88f8ba9734f704c270 100755 (executable)
  */
 namespace phpsqllint;
 
  */
 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';
     //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')) {
 }
 
 if (file_exists(__DIR__ . '/../src/phpsqllint/Autoloader.php')) {