-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphug-tester
More file actions
28 lines (23 loc) · 632 Bytes
/
phug-tester
File metadata and controls
28 lines (23 loc) · 632 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env php
<?php
use Phug\Tester\Cli;
$vendor = 'vendor';
$autoload = 'vendor/autoload.php';
if (!file_exists($autoload)) {
$vendor = __DIR__.'/..';
$autoload = __DIR__.'/../autoload.php';
}
if (!file_exists($autoload)) {
$vendor = __DIR__.'/../..';
$autoload = __DIR__.'/../../autoload.php';
}
if (!file_exists($autoload)) {
$vendor = __DIR__.'/vendor';
$autoload = __DIR__.'/vendor/autoload.php';
}
if (!file_exists($autoload)) {
throw new \RuntimeException('Autoload not found. Please run: composer install');
}
include $autoload;
$cli = new Cli($vendor);
exit($cli->run($argv) ? 0 : 1);