Read trailing data on apply
This was removed by mistake during the direct unpack PR refactoring. Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
parent
4924bcb5fe
commit
550518ab84
@ -19,6 +19,7 @@ package apply
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"io"
|
"io"
|
||||||
|
"io/ioutil"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/containerd/containerd/content"
|
"github.com/containerd/containerd/content"
|
||||||
@ -97,6 +98,11 @@ func (s *fsApplier) Apply(ctx context.Context, desc ocispec.Descriptor, mounts [
|
|||||||
return emptyDesc, err
|
return emptyDesc, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Read any trailing data
|
||||||
|
if _, err := io.Copy(ioutil.Discard, rc); err != nil {
|
||||||
|
return emptyDesc, err
|
||||||
|
}
|
||||||
|
|
||||||
for _, p := range processors {
|
for _, p := range processors {
|
||||||
if ep, ok := p.(interface {
|
if ep, ok := p.(interface {
|
||||||
Err() error
|
Err() error
|
||||||
|
Loading…
Reference in New Issue
Block a user