Skip to content

Commit

Permalink
Merge pull request #37148 from owncloud/fix-exit-code
Browse files Browse the repository at this point in the history
Add non-zero exit code for non-writable config dir and missing app-di…
  • Loading branch information
phil-davis authored Mar 20, 2020
2 parents f9098d0 + 6772235 commit 2ced00c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions changelog/unreleased/37148
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bugfix: Fix CLI zero exit code on startup errors

Zero exit code was returned on startup with a missing app directory
or a non-writable config directory. Now exit code is 1.

https://github.com/owncloud/core/issues/37098
https://github.com/owncloud/core/pull/37148
4 changes: 2 additions & 2 deletions lib/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public static function checkConfig() {
echo $l->t('This can usually be fixed by giving the webserver write access to the config directory')."\n";
echo "\n";
echo $l->t('See %s', [ $urlGenerator->linkToDocs('admin-dir_permissions') ])."\n";
exit;
exit(1);
} else {
OC_Template::printErrorPage(
$l->t('Cannot write into "config" directory!'),
Expand Down Expand Up @@ -530,7 +530,7 @@ public static function init() {
// we can't use the template error page here, because this needs the
// DI container which isn't available yet
print($e->getMessage());
exit();
exit(1);
}

// setup the basic server
Expand Down

0 comments on commit 2ced00c

Please sign in to comment.