OCC commands verbose mode

I’m trying to run maintenance and generate some output.
I tried:

php -f ${cloud}/occ integrity:check-core -- -vvv --no-interaction >> ${logfile} 2>&1

result was:

No arguments expected for "integrity:check-core" command, got "-vvv".

I tried

php -f ${cloud}/occ integrity:check-core -- --verbose 3 --no-interaction >> ${logfile} 2>&1

result was:

No arguments expected for "integrity:check-core" command, got "--verbose".

According to the help this should work

occ help integrity:check-core

Description:
  Check integrity of core code using a signature.

Usage:
  integrity:check-core [options]

Options:
      --output[=OUTPUT]  Output format (plain, json or json_pretty, default is plain) [default: "plain"]
  -h, --help             Display help for the given command. When no command is given display help for the list command
  -q, --quiet            Do not output any message
  -V, --version          Display this application version
      --ansi|--no-ansi   Force (or disable --no-ansi) ANSI output
  -n, --no-interaction   Do not ask any interactive question
      --no-warnings      Skip global warnings, show command output only
  -v|vv|vvv, --verbose   Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Why doesn’t this work?

NC27

seems you can’t run checks while in maintenance mode. I turned it off, but now get even weirder stuff:

In ArgvInput.php line 122:
                                                          
  [Symfony\Component\Console\Exception\RuntimeException]  
  The "-e" option does not exist.                         
                                                          

Exception trace:
  at /home/mountain/public_html/cloud/3rdparty/symfony/console/Input/ArgvInput.php:122
 Symfony\Component\Console\Input\ArgvInput->parseShortOptionSet() at /home/mountain/public_html/cloud/3rdparty/symfony/console/Input/ArgvInput.php:104
 Symfony\Component\Console\Input\ArgvInput->parseShortOption() at /home/mountain/public_html/cloud/3rdparty/symfony/console/Input/ArgvInput.php:84
 Symfony\Component\Console\Input\ArgvInput->parseToken() at /home/mountain/public_html/cloud/3rdparty/symfony/console/Input/ArgvInput.php:71
 Symfony\Component\Console\Input\ArgvInput->parse() at /home/mountain/public_html/cloud/3rdparty/symfony/console/Input/Input.php:55
 Symfony\Component\Console\Input\Input->bind() at /home/mountain/public_html/cloud/3rdparty/symfony/console/Command/Command.php:257
 Symfony\Component\Console\Command\Command->run() at /home/mountain/public_html/cloud/core/Command/Base.php:177
 OC\Core\Command\Base->run() at /home/mountain/public_html/cloud/3rdparty/symfony/console/Application.php:1040
 Symfony\Component\Console\Application->doRunCommand() at /home/mountain/public_html/cloud/3rdparty/symfony/console/Application.php:301
 Symfony\Component\Console\Application->doRun() at /home/mountain/public_html/cloud/3rdparty/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at /home/mountain/public_html/cloud/lib/private/Console/Application.php:211
 OC\Console\Application->run() at /home/mountain/public_html/cloud/console.php:100
 require_once() at /home/mountain/public_html/cloud/occ:11

integrity:check-core [--output [OUTPUT]]

works now like this. No idea what happened.

/usr/local/bin/php -f ${cloud}/occ integrity:check-core -vvv --no-interaction >> ${logfile} 2>&1

It appears you had an extra -- in your command.

Not sure your full command when you got this, but I can only reproduce it if use the command occ integrity:check-core -vvv -e which makes sense since -e isn’t a valid parameter.

Well it looks like a valid command-line syntax now. :slight_smile:

2 Likes

yes that was due to a bit of confusion on my part. The -- is required when the first PHP command argument starts with a “-” . But in this case the first argument was “integrity:check-core” and not the “-vvv” or “–verbose 3”

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.