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

Add non-zero exit code for non-writable config dir and missing app-di… #37148

Merged
merged 1 commit into from
Mar 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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