Skip to content

Extract does not offer correct return value on Exception #14

@cognifloyd

Description

@cognifloyd

Using "t3xutils.phar extract", the exit code is always 0, even if there was an exception.

The exit code is determined by $success when Dispatcher exits here: https://github.com/etobi/Typo3ExtensionUtils/blob/master/lib/etobi/extensionUtils/Dispatcher.php#L91

$status is supposed to be set in extractCommand with the return value of extractAction:
https://github.com/etobi/Typo3ExtensionUtils/blob/master/lib/etobi/extensionUtils/Dispatcher.php#L216

But, extractAction does not have a return value:
https://github.com/etobi/Typo3ExtensionUtils/blob/master/lib/etobi/extensionUtils/Controller/T3xController.php#L73

Also, the exception catcher does not exit with any error codes:
https://github.com/etobi/Typo3ExtensionUtils/blob/master/bin/t3xutils.php#L14

Either the extractAction needs to somehow return an appropriate boolean, or the exception catcher needs to exit with an error code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions