Commit cda2ec58 authored by Patrick Paysant's avatar Patrick Paysant
Browse files

console.log now returns 1 instead of 0 on all errors

parent 3c6ce8d5
......@@ -54,7 +54,7 @@ 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');
......@@ -62,7 +62,7 @@ try {
if (!OC_Util::runningOnWindows()) {
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'));
......@@ -70,8 +70,8 @@ try {
echo "Console has to be executed with the user that owns the file config/config.php" . PHP_EOL;
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);
echo "Try adding 'sudo -u " . $configUser['name'] . " ' to the beginning of the command (without the single quotes)" . PHP_EOL;
exit(1);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment