Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
cda2ec58
Commit
cda2ec58
authored
Oct 13, 2016
by
Patrick Paysant
Browse files
console.log now returns 1 instead of 0 on all errors
parent
3c6ce8d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
console.php
View file @
cda2ec58
...
...
@@ -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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment