Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a command-line option for quiet output #3457

Open
2 tasks done
pawelszramowski opened this issue May 31, 2024 · 0 comments
Open
2 tasks done

Add a command-line option for quiet output #3457

pawelszramowski opened this issue May 31, 2024 · 0 comments

Comments

@pawelszramowski
Copy link

pawelszramowski commented May 31, 2024

Checklist

  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my request.

Is Your Feature Request Related To A Problem? Please describe.

Choco prints a lot of unnecessary information with no simple way to suppress it. Consider this output from choco install ninja --version 1.10.2 --yes --allow-downgrade:

Chocolatey v2.2.2
Installing the following packages:
ninja
By installing, you accept licenses for the packages.
ninja v1.10.2 already installed.
 Use --force to reinstall, specify a version to install, or try upgrade.

Chocolatey installed 0/1 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Warnings:
 - ninja - ninja v1.10.2 already installed.
 Use --force to reinstall, specify a version to install, or try upgrade.

When the command is run manually, it may make sense to show this. However, when it's run from a script, really none of these messages need to be shown and they just pollute the output.

Describe The Solution. Why is it needed?

--quiet command-line option should be added. The option should cause only errors to be printed. If the caller wanted to suppress warnings too, they should redirect the standard error stream to null (but see the issue listed as related).

Option --limit-output is not a solution here, because it suppresses the errors too.

Additional Context

In Python package manager pip, --quiet is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels). It's the opposite of --verbose.

Related Issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants