Skip to content

Commit

Permalink
Bin: fix autoloading
Browse files Browse the repository at this point in the history
  • Loading branch information
f3l1x committed Oct 1, 2024
1 parent 819604c commit b8204a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 7 additions & 1 deletion bin/mate.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?php declare (strict_types = 1);

require __DIR__ . '/../vendor/autoload.php';
if (
!(is_file($file = __DIR__ . '/../vendor/autoload.php') && include $file) &&
!(is_file($file = __DIR__ . '/../../../autoload.php') && include $file)
) {
fwrite(STDERR, "Install packages using Composer.\n");
exit(1);
}

Contributte\Mate\Bootstrap::run();
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@
}
},
"bin": [
"bin/mate",
"bin/mate.php"
"bin/mate"
],
"minimum-stability": "dev",
"prefer-stable": true,
Expand Down

0 comments on commit b8204a0

Please sign in to comment.