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