-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
don't leave empty CIDFile behind #4621
Conversation
defer containerIDFile.Close() | ||
defer func() { | ||
containerIDFile.Close() | ||
var CIDFileInfo os.FileInfo |
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.
Why uppercase?
@crosbymichael I've updated the PR. |
defer containerIDFile.Close() | ||
defer func() { | ||
containerIDFile.Close() | ||
var cidFileInfo os.FileInfo |
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.
you can group these in
var (
)
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.
It's done.
This makes `--cidfile` clean up empty container ID files. These are left behind when creating the container fails. Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
LGTM |
1 similar comment
LGTM |
don't leave empty CIDFile behind
This makes
--cidfile
clean up empty container ID files. These are left behind when creating the container fails.This PR adds a test and renames the existing CIDFile tests.
Fixes #3791