Skip to content

Commit

Permalink
fixes use of deprecated pattern matching method for #526 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzyfresh committed Mar 8, 2023
1 parent 14c81db commit 10a1e10
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ import (
"crypto/sha256"
"encoding/hex"
"fmt"
"io"
"io/fs"
"os"
"path/filepath"
"runtime"
"strings"

pbempty "github.com/golang/protobuf/ptypes/empty"
"github.com/moby/buildkit/frontend/dockerfile/dockerignore"
"github.com/moby/patternmatcher"
Expand All @@ -18,12 +25,6 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/emptypb"
"io"
"io/fs"
"os"
"path/filepath"
"runtime"
"strings"
)

type dockerNativeProvider struct {
Expand Down Expand Up @@ -511,7 +512,7 @@ func hashContext(dockerContextPath string, dockerfile string) (string, error) {
if path == "." {
return nil
}
ignore, err := ignoreMatcher.Matches(path)
ignore, err := ignoreMatcher.MatchesOrParentMatches(path)
if err != nil {
return fmt.Errorf("%s rule failed: %w", dockerIgnorePath, err)
}
Expand Down

0 comments on commit 10a1e10

Please sign in to comment.