Skip to content

Conversation

@kesselb
Copy link
Contributor

@kesselb kesselb commented Oct 14, 2018

--verbose and --quiet works out of the box for commands. When you are fine with the default behaviour there is no need to redefine these options within an command.

https://github.com/nextcloud/3rdparty/blob/f48c7e29b8001dff95ac00c16338becef1f175dd/symfony/console/Application.php#L865-L868

This pr replace if ($verbose) with OutputInterface::VERBOSITY_VERBOSE

@kesselb kesselb added enhancement 3. to review Waiting for reviews labels Oct 14, 2018
@kesselb kesselb added this to the Nextcloud 15 milestone Oct 14, 2018
@kesselb
Copy link
Contributor Author

kesselb commented Oct 14, 2018

I'm a bit unsure about this one

# restrict the verbosity level to VERBOSITY_VERBOSE
if ($output->getVerbosity() > OutputInterface::VERBOSITY_VERBOSE) {
$output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE);
}

suppress output looks wrong to me but it was there before.

@ChristophWurst
Copy link
Member

Nice! Didn't know about this flag. Will definitely use this in future commands 🚀

@ChristophWurst
Copy link
Member

I'm a bit unsure about this one

Maybe @icewind1991 can give some input on this. Ref ce2dba0.

@kesselb kesselb force-pushed the feature/noid/drop-verbose-scan branch from 06b2f1b to 1177ad7 Compare October 21, 2018 20:15
}

$scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function ($path) use ($output) {
$output->writeln("\tFile\t<info>$path</info>", OutputInterface::VERBOSITY_VERBOSE);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ChristophWurst may i revert \t like you suggested in #11968?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this.

Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

@MorrisJobke MorrisJobke merged commit a88e7d3 into master Nov 6, 2018
@MorrisJobke MorrisJobke deleted the feature/noid/drop-verbose-scan branch November 6, 2018 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants