silverstripe-framework/bin/sake
Guy Sartorelli e46135be0a
NEW Refactor CLI interaction with Silverstripe app (#11353)
- Turn sake into a symfony/console app
- Avoid using HTTPRequest for CLI interaction
- Implement abstract hybrid execution path
2024-09-26 17:16:47 +12:00

16 lines
363 B
PHP
Executable File

#!/usr/bin/env php
<?php
use SilverStripe\Cli\Sake;
// Ensure that people can't access this from a web-server
if (!in_array(PHP_SAPI, ['cli', 'cgi', 'cgi-fcgi'])) {
echo 'sake cannot be run from a web request, you have to run it on the command-line.';
die();
}
require_once __DIR__ . '/../src/includes/autoload.php';
$sake = new Sake();
$sake->run();