Skip to content

Commit 03e5862

Browse files
Merge pull request containerd#354 from crosbymichael/derr
Fix the error check in Delete method
2 parents 2c973d7 + 9ff4a00 commit 03e5862

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtime/container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ func (c *container) readSpec() (*specs.Spec, error) {
251251
func (c *container) Delete() error {
252252
var err error
253253
args := append(c.runtimeArgs, "delete", c.id)
254-
if b, derr := exec.Command(c.runtime, args...).CombinedOutput(); err != nil {
254+
if b, derr := exec.Command(c.runtime, args...).CombinedOutput(); derr != nil {
255255
err = fmt.Errorf("%s: %q", derr, string(b))
256256
}
257257
if rerr := os.RemoveAll(filepath.Join(c.root, c.id)); rerr != nil {

0 commit comments

Comments
 (0)