-
Notifications
You must be signed in to change notification settings - Fork 109
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
Is there a way to prevent any output from docker-compose up, build etc? #292
Comments
Currently it's only available on some commands. For exemple docker.buildx.build. I'll work on improving this area :) |
Just for my personal curiosity and also to better satisfy the request, could you tell me what's your use case? What you use python-on-whales for and why you want to supress the output? |
Sorry for the delay. |
Thanks! I believe your use case is valid and should be in the scope of python-on-whales. I'll see what's the best way to implement it, so that the interface is intuitive! |
Hi, |
Thank you, this is great feedback, I'll look into it :) |
After this last PR is merged, docker.compose up, build and pull will all have a quiet flag, off by default, and I ensured everything was displayed on the screen when the flag is off. With this I think we can close this issue :) |
Thanks for implementation that works great now for starting but there is still no output when using down command. Forgot to mention it in previous comment ;/ |
Thanks for the report! I'll fix it |
It seems that it is not possible to capture the stdout of the methods. Indeed, the stdout or stderr is not inherited from the main thread. Is there a way to capture the output of the commands? Code:
Expected Behaviour:
Actual Behaviour
The only solution to this issue that I found is this, but this seems more like a hack. Indeed, exceptions that are raised in the subprocess are not propagated to the main thread with this hack.
I also tested the behaviour of docker-py package and they do not output "Login Succeeded" I was wondering if there was a better way to capture the output of python_on_whales methods or silence them if needed (--quiet). |
As the title suggests, I would like to prevent any output from python-on-whales.
Is there a way to do it?
Thanks!
The text was updated successfully, but these errors were encountered: