pipx icon indicating copy to clipboard operation
pipx copied to clipboard

pipx install ignores --quiet

Open Slooz opened this issue 1 year ago • 5 comments

Describe the bug

How to reproduce

$ pipx install --quiet --quiet cowsay

creating virtual environment...
installing cowsay...
done! ✨ 🌟 ✨
  installed package cowsay 6.1, installed using Python 3.10.12
  These apps are now globally available
    - cowsay

Expected behavior

Quiet is respected

Slooz avatar Aug 13 '24 00:08 Slooz

This is as quiet as it can get... the rest of the output isn't logged.

chrysle avatar Aug 13 '24 17:08 chrysle

I can see no difference with or without the --quiet flag.

And the output given by the OP is everything but quiet.

I would expect none of the lines displayed in the issue description to be printed when even the first quiet option is passed.

rems4e avatar Sep 25 '24 15:09 rems4e

@chrysle, quiet should remove INFO logs:

$ pipx --help
options:
  --quiet, -q           Give less output. May be used multiple times corresponding to the ERROR and CRITICAL logging levels. The count maxes out at 2.

Are the following logs considered non-INFO?

creating virtual environment...
installing cowsay...
done! ✨ 🌟 ✨
  installed package cowsay 6.1, installed using Python 3.10.12
  These apps are now globally available
    - cowsay

Slooz avatar Sep 25 '24 15:09 Slooz

same problem, it prints a lot of logs even when using 2>/dev/null

pipx install --quiet mkdocs 2>/dev/null
installed package mkdocs 1.6.1, installed using Python 3.12.3
These apps are now globally available
  - mkdocs

saul-salazar-dotcom avatar Oct 22 '24 20:10 saul-salazar-dotcom

Would it make sense to have a mode (--quiet-but-for-real-this-time?) that outputs nothing at all, unless there is an error? The current status makes pipx relatively scripting-unfriendly.

rems4e avatar Jan 30 '25 17:01 rems4e