-
Notifications
You must be signed in to change notification settings - Fork 195
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
Hide banner message from python plugin #1823
Comments
I agree this is an annoying message. I'm not sure about adding a A few ideas:
@Lagoja @mikeland73 any thoughts on this? |
Mind explaining the issue with allowing the plunging to know the entrypoint to them being called? Seems like a useful and generic way of solving the problem that could enable other scenarios. |
@gcurtis For this message in particular, maybe we move it into the plugin README and out of the script itself. The README would show when you install Python, but not on subsequent runs? |
I feel like you want to see the message if you are not already in the virtual env. I would prefer that there was a way to let the banner be logged after the unit hook ran. That way people could configure the unit hook to enter the virtual env and then the banner could be suppressed. In the case where you enter a shell, and the virtual environment is not active, the banner is useful. I still feel that being able to suppress logging during script runs could be very useful and generic. |
The youtuber DevOps Toolkit just released an Unleash Devbox video so decided to try it out and this is the 1st issue/annoyance that I am running into with devbox. Would be great to suppress this so I don't have to see this when I cd (direnv) into each of my project directories every time. |
I'd prefer the banner not be used, you can show notes on first install / add, that's enough. |
Banner has been moved out of shell, and will only show the first time that the Virtualenv is setup. This should be ~once per project. |
What problem are you trying to solve?
The python plugin logs a banner message no matter what.. https://github.com/jetpack-io/devbox/blob/7f1633f6834f8772d31b06588c637b8f12cbe7c7/plugins/pip/venvShellHook.sh#L8
If you use the shell init_hook to enter the virtual env it would be nice to suppress this message. This is especially important when scripts are execute via
devbox run ...
, because the message ends up just being cruft.What solution would you like?
Create a environment variable set automatically by devbox:
DEVBOX_ENTRYPOINT=run:<script_name>
orDEVBOX_ENTRYPOINT=shell
.Then the python plugin could not print the banner if
DEVBOX_ENTRYPOINT=run:*
. This would solve the run case.Optionally, change the python plugin to not log the banner if a specific environment variable is present (ie.
DEVBOX_PLYTHON_PLUGIN_HIDE_BANNER
Alternatives you've considered
Writing a wrapper around devbox would be another way to solve this, but that seems like more maintenance in the long run.
The text was updated successfully, but these errors were encountered: