Skip to content

Commit c60e1fe

Browse files
GroovyCarrotkilahm
authored andcommitted
Added basic hhvm/autoload support. (#54)
While attempting to locate the autoloader, it will attempt to look for hh_autoload.php before looking for autoload.php.
1 parent e7e6748 commit c60e1fe

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

bin/hackunit

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@
55
$basedir = __DIR__;
66

77
do {
8-
if (file_exists($basedir.'/composer.json') &&
9-
file_exists($basedir.'/vendor/autoload.php')) {
10-
require_once ($basedir.'/vendor/autoload.php');
11-
break;
8+
if (file_exists($basedir.'/composer.json')) {
9+
if (file_exists($basedir.'/vendor/hh_autoload.php')) {
10+
require_once $basedir.'/vendor/hh_autoload.php';
11+
break;
12+
}
13+
elseif (file_exists($basedir.'/vendor/autoload.php')) {
14+
require_once $basedir.'/vendor/autoload.php';
15+
break;
16+
}
1217
}
1318
$basedir = dirname($basedir);
1419
if ($basedir === '/') {

0 commit comments

Comments
 (0)