-
-
Notifications
You must be signed in to change notification settings - Fork 375
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
Silence hints/recommendations from Docker in the console #1640
Conversation
This approach adds a At any rate, another approach I considered was updating Thoughts or other ideas welcome. |
223e633
to
80266e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The general approach looks good. My only real hesitation is around the name "final" and whether it's maybe one level of abstraction too many to be worth pulling that out. Yes, it's a repeated configuration; but given that it's only being used in 2 places, that isn't likely to increase (AFAICT), and being an instance method means it can't be easily used for verification... maybe it's just easier to include the extra environment variable in the 2 places it's needed.
I agree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach looks much better to me. One minor nit inline.
src/briefcase/integrations/docker.py
Outdated
# Disable the hints/recommendations that Docker prints in the console | ||
"DOCKER_CLI_HINTS": "false", | ||
} | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor nits here:
- If the user provides an
env
dictionary as an argument, that dictionary will be modified in place - so using an environment in a subprocess will alter the environment - If, for some reason, you wanted to enable Docker hints (I don't know why, but work with me here 😄 ), there's no way to do so.
What about reversing the direction here: starting with a dictionary that contains `DOCKER_CLI_HINTS: "False"``, and updating that dictionary with env. That will ensure that the final dictionary is a copy, and any explicitly user-provided value will override the default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should have realized this wouldve updated the dictionary input...which is definitely undesired. I updated it so this (and future) default can be overridden.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Changes
Notes
PR Checklist: