diff --git a/Resources/bin/common.php b/Resources/bin/common.php index cf47fa44..89d34591 100644 --- a/Resources/bin/common.php +++ b/Resources/bin/common.php @@ -9,6 +9,10 @@ * file that was distributed with this source code. */ +if ('cli' !== \PHP_SAPI) { + throw new Exception('This script must be run from the command line.'); +} + define('LINE_WIDTH', 75); define('LINE', str_repeat('-', LINE_WIDTH)."\n"); diff --git a/Resources/bin/update-data.php b/Resources/bin/update-data.php index 2fffa4ec..2aeb141d 100644 --- a/Resources/bin/update-data.php +++ b/Resources/bin/update-data.php @@ -23,6 +23,10 @@ use Symfony\Component\Intl\Locale; use Symfony\Component\Intl\Util\GitRepository; +if ('cli' !== \PHP_SAPI) { + throw new Exception('This script must be run from the command line.'); +} + require_once __DIR__.'/common.php'; require_once __DIR__.'/autoload.php';