Generate can fall back to daux.phar, fixes #354
This commit is contained in:
parent
2bd1978f0e
commit
2effa5b6f8
9
generate
9
generate
@ -64,7 +64,14 @@ software, even if advised of the possibility of such damage.
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once("vendor/autoload.php");
|
if (file_exists('vendor/autoload.php')) {
|
||||||
|
require_once('vendor/autoload.php');
|
||||||
|
} elseif (file_exists('daux.phar')) {
|
||||||
|
define('PHAR_DIR', __DIR__);
|
||||||
|
require_once("phar://" . __DIR__ . "/daux.phar/vendor/autoload.php");
|
||||||
|
} else {
|
||||||
|
throw new Exception("Impossible to load Daux, missing vendor/ or daux.phar");
|
||||||
|
}
|
||||||
|
|
||||||
$application = new \Todaymade\Daux\Console\Application();
|
$application = new \Todaymade\Daux\Console\Application();
|
||||||
$application->run();
|
$application->run();
|
||||||
|
@ -81,7 +81,7 @@ if (file_exists('vendor/autoload.php')) {
|
|||||||
define('PHAR_DIR', __DIR__);
|
define('PHAR_DIR', __DIR__);
|
||||||
require_once("phar://" . __DIR__ . "/daux.phar/vendor/autoload.php");
|
require_once("phar://" . __DIR__ . "/daux.phar/vendor/autoload.php");
|
||||||
} else {
|
} else {
|
||||||
throw new Exception("Impossible to load Daux, missing vendor and phar");
|
throw new Exception("Impossible to load Daux, missing vendor/ or daux.phar");
|
||||||
}
|
}
|
||||||
|
|
||||||
\Todaymade\Daux\Server\Server::serve($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], $_REQUEST);
|
\Todaymade\Daux\Server\Server::serve($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], $_REQUEST);
|
||||||
|
Loading…
Reference in New Issue
Block a user