-
Notifications
You must be signed in to change notification settings - Fork 949
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
bugfix: can remove the exited container without flag force. #640
bugfix: can remove the exited container without flag force. #640
Conversation
Signed-off-by: skoo87 <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #640 +/- ##
=======================================
Coverage 14.21% 14.21%
=======================================
Files 65 65
Lines 3736 3736
=======================================
Hits 531 531
Misses 3159 3159
Partials 46 46
Continue to review full report at Codecov.
|
@@ -163,7 +163,7 @@ func (mgr *ContainerManager) Remove(ctx context.Context, name string, option *Co | |||
c.Lock() | |||
defer c.Unlock() | |||
|
|||
if !c.IsStopped() && !c.IsCreated() && !option.Force { | |||
if !c.IsStopped() && !c.IsExited() && !c.IsCreated() && !option.Force { | |||
return fmt.Errorf("container: %s is not stopped, can't remove it without flag force", c.ID()) |
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.
Do we need to also change the error message?
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 think it's unnecessary ....
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 is all right.
LGTM |
Signed-off-by: skoo87 [email protected]
1.Describe what this PR did
2.Does this pull request fix one issue?
fix #639
3.Describe how you did it
4.Describe how to verify it
5.Special notes for reviews