Drupal-console: Exitcode debug:site always returns 0

Created on 2 Feb 2018  路  4Comments  路  Source: hechoendrupal/drupal-console

When running drupal site:debug [SITENAME] it will always return 0, while it should return a non-zero exit code when it can not find [SITENAME].

bug

All 4 comments

Was digging a bit deeper into this, I see it does do a return 1; though it does not end up in my terminal? echo $?

I'm starting to suspect that all commands are not returning non-zero exit codes. Interestingly, when not using the launcher I get the expected exit code. Example:

Using launcher - _Not_ working as expected

$ drupal debug:site not-existing-site; echo $?

 [ERROR] Invalid site name

0

NOT using launcher - Working as expected

$ vendor/bin/drupal debug:site not-existing-site; echo $?

 [ERROR] Invalid site name

1

Not entirely sure, but doesn't the launcher's /bin/drupal.php always exit into 0 if it successfully executed the local launcher? I think it should respect the exit code of the local launcher, right? (CC: @jmolivas)

https://github.com/hechoendrupal/drupal-console-launcher/blob/master/bin/drupal.php#L127

Totally agree on that it should respect the exit code.

Was this page helpful?
0 / 5 - 0 ratings