fix error checking

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2021-02-17 15:27:40 -08:00
parent 05d45dff29
commit 845fe7eca4

View File

@ -3,6 +3,7 @@ package dagger
import (
"archive/tar"
"context"
"errors"
"fmt"
"io"
"os"
@ -169,7 +170,7 @@ func (c *Client) outputfn(ctx context.Context, r io.Reader) (*compiler.Value, er
tr := tar.NewReader(r)
for {
h, err := tr.Next()
if err == io.EOF {
if errors.Is(err, io.EOF) {
break
}
if err != nil {