Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys:setup:run exits with status code '0' even if an error occurred #571

Closed
fbrnc opened this issue May 28, 2015 · 3 comments
Closed

sys:setup:run exits with status code '0' even if an error occurred #571

fbrnc opened this issue May 28, 2015 · 3 comments

Comments

@fbrnc
Copy link
Contributor

fbrnc commented May 28, 2015

In this example I'm triggering an exception:

vagrant@vagrant-ubuntu-trusty-64:/var/www/demo/releases/build_21/htdocs$ ../tools/n98-magerun.phar sys:setup:run
Error in file: "/var/www/demo/releases/build_21/htdocs/app/code/local/demo/Sales/sql/demo_sales_setup/mysql4-upgrade-0.1.3-0.1.4.php" - HELLO
+---+------------------------------------------------------+----------------------------------------------------+
| # | File/Line                                            | Method                                             |
+---+------------------------------------------------------+----------------------------------------------------+
| 1 | app/code/core/Mage/Core/Model/Resource/Setup.php:645 | Mage::exception                                    |
| 2 | app/code/core/Mage/Core/Model/Resource/Setup.php:437 | Mage_Core_Model_Resource_Setup::_modifyResourceDb  |
| 3 | app/code/core/Mage/Core/Model/Resource/Setup.php:320 | Mage_Core_Model_Resource_Setup::_upgradeResourceDb |
| 4 | app/code/core/Mage/Core/Model/Resource/Setup.php:235 | Mage_Core_Model_Resource_Setup::applyUpdates       |
+---+------------------------------------------------------+----------------------------------------------------+
+------+-----------------------------------------------------+
| Line | Code                                                |
+------+-----------------------------------------------------+
| 1    | <?php                                               |
| 2    |                                                     |
| 3    | /* @var $installer Mage_Sales_Model_Entity_Setup */ |
| 4    | $installer = $this;                                 |
| 5    | throw new Exception("HELLO");                       |
+------+-----------------------------------------------------+
vagrant@vagrant-ubuntu-trusty-64:/var/www/demo/releases/build_21/htdocs$ echo $?
0
@tkn98
Copy link
Collaborator

tkn98 commented May 29, 2015

@fbrnc: Can you share the magerun version? We had a recent update and a similar issue (#533) so I'd just like to know how far this propagates.

In any case we should cover this with a regression-test.

@fbrnc
Copy link
Contributor Author

fbrnc commented Jun 1, 2015

Ok, so I tested this with 1.96.0 and I got an status code 0.
Then I did a selfupdate which resulted in 1.96.1 and now I get 130.

So it looks like the problem is already addressed in the latest version.
Sorry for not checking before I posted the issue...

@fbrnc fbrnc closed this as completed Jun 1, 2015
@tkn98
Copy link
Collaborator

tkn98 commented Jun 2, 2015

@fbrnc: no problem, this was a recent change. And great to see, it fixed your reported issue, too. So thank you for reporting and clarifying, don't feel sorry about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants