summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-10-21 10:48:59 +0200
committerGitHub <noreply@github.com>2016-10-21 10:48:59 +0200
commit9965a95e3b9aff118fa7a34102e5ac31367ac7e2 (patch)
tree6dd952c643dea9ba3421974aa6163386fd8d7f44
parent2b76d14330b5e6712b10411b6f0a7628962550e5 (diff)
parent81d0c472447ae9e5531dae63dd24ca7e6c544a0b (diff)
downloadnextcloud-server-9965a95e3b9aff118fa7a34102e5ac31367ac7e2.tar.gz
nextcloud-server-9965a95e3b9aff118fa7a34102e5ac31367ac7e2.zip
Merge pull request #1842 from nextcloud/oc_26372
console.php now returns 1 instead of 0 on all errors (#26372)
-rw-r--r--console.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/console.php b/console.php
index 3c68429cbd4..c9a9a49c4e9 100644
--- a/console.php
+++ b/console.php
@@ -52,14 +52,14 @@ try {
if (!OC::$CLI) {
echo "This script can be run from the command line only" . PHP_EOL;
- exit(0);
+ exit(1);
}
set_exception_handler('exceptionHandler');
if (!function_exists('posix_getuid')) {
echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php" . PHP_EOL;
- exit(0);
+ exit(1);
}
$user = posix_getpwuid(posix_getuid());
$configUser = posix_getpwuid(fileowner(OC::$configDir . 'config.php'));
@@ -68,7 +68,7 @@ try {
echo "Current user: " . $user['name'] . PHP_EOL;
echo "Owner of config.php: " . $configUser['name'] . PHP_EOL;
echo "Try adding 'sudo -u " . $configUser['name'] . " ' to the beginning of the command (without the single quotes)" . PHP_EOL;
- exit(0);
+ exit(1);
}
$oldWorkingDir = getcwd();