fix composer autoload in bins
[mdref/mdref] / bin / stub2ref
index de1899b1778a73ef6c09ec76b141367940472987..f0d11b197151010aabe88d58a8c81793aecc5890 100755 (executable)
@@ -3,7 +3,7 @@
 
 namespace mdref;
 
-require_once __DIR__."/../vendor/autoload.php";
+require_once $_composer_autoload_path ?? __DIR__."/../vendor/autoload.php";
 
 if ($argc < 3) {
        fprintf(STDERR, "Usage: cd ref-<ns> && %s <ns> <stub.php>\n", $argv[0]);