@@ -926,22 +926,22 @@ func (s *service) Delete(requestCtx context.Context, req *taskAPI.DeleteRequest)
926
926
// Trying to release stub drive for further reuse
927
927
err = s .containerStubHandler .Release (requestCtx , req .ID , s .driveMountClient , s .machine )
928
928
if err != nil {
929
- multierror .Append (result , errors .Wrapf (err , "failed to release stub drive for container: %s" , req .ID ))
929
+ result = multierror .Append (result , errors .Wrapf (err , "failed to release stub drive for container: %s" , req .ID ))
930
930
}
931
931
932
932
// Otherwise, delete the container
933
933
dir , err := s .shimDir .BundleLink (req .ID )
934
934
if err != nil {
935
- return nil , errors .Wrapf (err , "failed to find the bundle directory of the container: %s" , req .ID )
935
+ result = multierror . Append ( result , errors .Wrapf (err , "failed to find the bundle directory of the container: %s" , req .ID ) )
936
936
}
937
937
938
938
_ , err = os .Stat (dir .RootPath ())
939
939
if os .IsNotExist (err ) {
940
- return nil , errors .Wrapf (err , "failed to find the bundle directory of the container: %s" , dir .RootPath ())
940
+ result = multierror . Append ( result , errors .Wrapf (err , "failed to find the bundle directory of the container: %s" , dir .RootPath () ))
941
941
}
942
942
943
943
if err = os .Remove (dir .RootPath ()); err != nil {
944
- return nil , multierror .Append (result , errors .Wrapf (err , "failed to remove the bundle directory of the container: %s" , dir .RootPath ()))
944
+ result = multierror .Append (result , errors .Wrapf (err , "failed to remove the bundle directory of the container: %s" , dir .RootPath ()))
945
945
}
946
946
947
947
return resp , result .ErrorOrNil ()
0 commit comments