mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 03:53:13 +00:00
Fix #1489 : Let errors happen when they occur
This commit is contained in:
@@ -33,7 +33,6 @@ use Alchemy\Phrasea\Command\Setup\XSendFileConfigurationDumper;
|
||||
|
||||
require_once __DIR__ . '/../lib/autoload.php';
|
||||
|
||||
try {
|
||||
$cli = new CLI("
|
||||
_____ _ _ _____ _____ ______ _ _ ______ _______
|
||||
| __ \| | | | __ \ /\ / ____| ____| /\ | \ | | ____|__ __|
|
||||
@@ -102,10 +101,4 @@ try {
|
||||
|
||||
$cli->loadPlugins();
|
||||
|
||||
$result_code = is_int($cli->run()) ? : 1;
|
||||
} catch (\Exception $e) {
|
||||
$result_code = 1;
|
||||
echo sprintf("\nAn error occured :\n\n\t\033[0;31m%s\033[0;37m\n\n", $e->getMessage());
|
||||
}
|
||||
|
||||
exit($result_code);
|
||||
exit(is_int($cli->run()) ? : 1);
|
||||
|
@@ -44,7 +44,6 @@ use Doctrine\ORM\Tools\Console\Command\ValidateSchemaCommand;
|
||||
|
||||
require_once __DIR__ . '/../lib/autoload.php';
|
||||
|
||||
try {
|
||||
$cli = new CLI("
|
||||
___ ___ _ _ ___ __ __ ___ ___ ___ ____ __ __ __ ___
|
||||
( \( _)( )( )( _)( ) / \( ,\( _)( ,) (_ _)/ \ / \( ) / __)
|
||||
@@ -101,10 +100,4 @@ try {
|
||||
new ValidateSchemaCommand(),
|
||||
));
|
||||
|
||||
$cli->runCLI();
|
||||
} catch (Exception $e) {
|
||||
echo "an error occured : " . $e->getMessage();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
exit(0);
|
||||
exit($cli->runCLI());
|
||||
|
@@ -25,7 +25,6 @@ use Alchemy\Phrasea\Command\Setup\CheckEnvironment;
|
||||
|
||||
require_once __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
try {
|
||||
$app = new CLI("
|
||||
_____ _ _ _____ _____ ______ _ _ ______ _______
|
||||
| __ \| | | | __ \ /\ / ____| ____| /\ | \ | | ____|__ __|
|
||||
@@ -65,10 +64,4 @@ try {
|
||||
$app->command(new CheckEnvironment('check:system'));
|
||||
$app->command(new Install('system:install'));
|
||||
|
||||
$result_code = is_int($app->run()) ? : 1;
|
||||
} catch (\Exception $e) {
|
||||
$result_code = 1;
|
||||
echo sprintf("\nAn error occured :\n\n\t\033[0;31m%s\033[0;37m\n\n", $e->getMessage());
|
||||
}
|
||||
|
||||
exit($result_code);
|
||||
exit(is_int($app->run()) ? : 1);
|
||||
|
@@ -64,7 +64,6 @@ class module_console_systemUpgrade extends Command
|
||||
}
|
||||
|
||||
if ($continue == 'y') {
|
||||
try {
|
||||
$output->write('<info>Upgrading...</info>', true);
|
||||
|
||||
if (count(User_Adapter::get_wrong_email_users($this->container)) > 0) {
|
||||
@@ -98,10 +97,6 @@ class module_console_systemUpgrade extends Command
|
||||
$output->writeln("");
|
||||
$output->writeln("");
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
|
||||
$output->writeln(sprintf('<error>An error occured while upgrading : %s </error>', $e->getMessage()));
|
||||
}
|
||||
} else {
|
||||
$output->write('<info>Canceled</info>', true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user