-
Notifications
You must be signed in to change notification settings - Fork 2k
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
system prune: only warn for volumes if --volumes is given #255
Conversation
Codecov Report
@@ Coverage Diff @@
## master #255 +/- ##
==========================================
+ Coverage 46.84% 46.85% +<.01%
==========================================
Files 172 172
Lines 11692 11692
==========================================
+ Hits 5477 5478 +1
+ Misses 5903 5902 -1
Partials 312 312 |
I know it's only for 2 lines, but I think a text template would be cleaner. Something like: https://play.golang.org/p/nLs0YvRrRE |
ca71856
to
6e89c02
Compare
Signed-off-by: Harald Albers <github@albersweb.de>
6e89c02
to
849b0e9
Compare
@mlaventure Thanks for your advice and the code sample. I pulled out message generation into a function that uses a template. PTAL. |
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.
LGTM
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.
LGTM
#118 changed
docker system prune
to only remove volumes if--volumes
is given.The warning message, however, still always warns about volume removal:
The warning message in the above example is wrong: no volumes will be deleted.
With this PR, the volume removal warning is included selectively depending on whether
--volumes
is given or not.