From d3b9ef066c521e078c9236b32d857b9934daa0ff Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Thu, 24 May 2012 10:35:40 +0200 Subject: [PATCH] Correct handle of exit code --- bin/console | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/bin/console b/bin/console index 3916429b92..f245f12f1c 100755 --- a/bin/console +++ b/bin/console @@ -23,11 +23,7 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Application; -$Core = require_once dirname(__FILE__) . '/../lib/bootstrap.php'; - -$result_code = 1; - -$result_code = 1; +require_once dirname(__FILE__) . '/../lib/bootstrap.php'; try { $app = new Application(" @@ -80,8 +76,7 @@ try { $app->add(new module_console_fieldsRename('fields:rename')); $app->add(new module_console_fieldsMerge('fields:merge')); - - $result_code = $app->run() === 0 ? : 1; + $result_code = is_int($app->run()) ? : 1; } catch (Exception $e) { echo sprintf("an error occured : %s", $e->getMessage()); }