diff --git a/bin/semver b/bin/semver index 37530f3..aa87fae 100644 --- a/bin/semver +++ b/bin/semver @@ -3,7 +3,13 @@ namespace vierbergenlars\SemVer\Application\SemVer; -require __DIR__ . '/../vendor/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'; + } +} use vierbergenlars\SemVer\version; use vierbergenlars\SemVer\expression; diff --git a/bin/update-versions b/bin/update-versions index a0cb33f..510b91d 100644 --- a/bin/update-versions +++ b/bin/update-versions @@ -3,7 +3,13 @@ namespace vierbergenlars\SemVer\Application\UpdateVersions; -require __DIR__ . '/../vendor/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'; + } +} use vierbergenlars\SemVer\version; use vierbergenlars\SemVer\expression;