Skip to content

Commit

Permalink
Merge pull request #16 from gorbunov/bugfix/watcher-autoload-inside-c…
Browse files Browse the repository at this point in the history
…omposer-project

Autoload path inside watcher.php fixed for composer project installation
  • Loading branch information
seregazhuk authored Oct 10, 2019
2 parents 3ece339 + f13de25 commit 3d72789
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Filesystem/watcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
use seregazhuk\PhpWatcher\Config\WatchList;
use seregazhuk\PhpWatcher\Watcher\Factory;

require __DIR__ . '/../../vendor/autoload.php';
if (file_exists(__DIR__ . '/../../vendor/autoload.php')) {
require __DIR__ . '/../../vendor/autoload.php';
} else {
require __DIR__.'/../../../../autoload.php';
}

$params = array_slice($_SERVER['argv'], 1);
$watchList = WatchList::fromJson($params[0]);
Expand Down

0 comments on commit 3d72789

Please sign in to comment.