Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
vito committed Apr 17, 2023
1 parent 9f54a16 commit 1d3056e
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions pkg/runtimes/buildkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -1617,19 +1617,12 @@ func (b *buildkitBuilder) thunkPathSt(ctx context.Context, source bass.ThunkPath
return llb.State{}, "", false, fmt.Errorf("thunk llb: %w", err)
}

var include []string
var exclude []string
if source.Path.Dir != nil {
include = source.Path.Dir.Include
exclude = source.Path.Dir.Exclude
}
include := source.Includes()
exclude := source.Excludes()

log := zapctx.FromContext(ctx)
var st llb.State
var sourcePath string
if len(include) > 0 || len(exclude) > 0 {
log.Warn("filtering thunk path", zap.Any("include", include), zap.Any("exclude", exclude))

filterSt := llb.Scratch().File(
llb.Copy(ib.Output, ib.OutputSourcePath, ".", &llb.CopyInfo{
IncludePatterns: include,
Expand Down Expand Up @@ -1674,7 +1667,6 @@ func (b *buildkitBuilder) thunkPathSt(ctx context.Context, source bass.ThunkPath
var hostPathCache = newProtoCache[llb.State]()

func (b *buildkitBuilder) hostPathSt(ctx context.Context, source bass.HostPath) (llb.State, string, error) {
// TODO: can we restrict this to a more fine grained path?
localName := source.ContextDir

sourcePath := source.Path.FilesystemPath().FromSlash()
Expand Down

0 comments on commit 1d3056e

Please sign in to comment.