mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 01:34:55 +02:00
Add proper exit() code to bin/ commands
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
<?php
|
||||
|
||||
if(PHP_SAPI !== 'cli') {
|
||||
die('This script can be run only in command line mode.');
|
||||
echo 'This script can be run only in command line mode.';
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/../../common.php';
|
||||
@@ -9,10 +10,9 @@ require_once SYSTEM . 'functions.php';
|
||||
require_once SYSTEM . 'init.php';
|
||||
|
||||
if(clearCache()) {
|
||||
echo 'Cache cleared.';
|
||||
echo 'Cache cleared.' . PHP_EOL;
|
||||
}
|
||||
else {
|
||||
echo 'Unexpected error.';
|
||||
echo 'Unexpected error.' . PHP_EOL;
|
||||
exit(2);
|
||||
}
|
||||
|
||||
echo PHP_EOL;
|
Reference in New Issue
Block a user