Skip to content
This repository has been archived by the owner on Aug 1, 2020. It is now read-only.

Commit

Permalink
fix path
Browse files Browse the repository at this point in the history
  • Loading branch information
SmetDenis committed Nov 6, 2018
1 parent f7b1bb4 commit 73a720d
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion bin/teamcity-keykeeper
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,23 @@ umask(0000);
set_time_limit(0);

define('PATH_ROOT', dirname(__DIR__) . '/');
require_once PATH_ROOT . '/vendor/autoload.php';

$vendorPaths = [
realpath(__DIR__ . '/vendor/autoload.php'),
realpath(__DIR__ . '/../vendor/autoload.php'),
realpath(__DIR__ . '/../../vendor/autoload.php'),
realpath(__DIR__ . '/../../../vendor/autoload.php'),
realpath(__DIR__ . '/../../../../vendor/autoload.php'),
realpath(__DIR__ . '/../../../../../vendor/autoload.php'),
realpath('./vendor/autoload.php'),
];

foreach ($vendorPaths as $vendorPath) {
if (file_exists($vendorPath)) {
require_once $vendorPath;
break;
}
}

if ($homePath = Sys::getHome()) {
define('PATH_STORAGE_DEFAULT', $homePath . '/.config/teamcity-keykeeper');
Expand Down

0 comments on commit 73a720d

Please sign in to comment.