From e60d1d9535996092b0996c7f96c7ab21a50b695c Mon Sep 17 00:00:00 2001 From: Aaron Lehmann Date: Fri, 30 Apr 2021 18:25:39 -0700 Subject: [PATCH] Append rather than overwrite include patterns and exclude patterns --- pkg/llbutil/llbutil.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/llbutil/llbutil.go b/pkg/llbutil/llbutil.go index b8b28548..1ad8c040 100644 --- a/pkg/llbutil/llbutil.go +++ b/pkg/llbutil/llbutil.go @@ -133,7 +133,7 @@ func WithIncludePatterns(includePatterns []string) CopyIncludePatterns { } func (ip CopyIncludePatterns) SetCopyOption(ci *llb.CopyInfo) { - ci.IncludePatterns = ([]string)(ip) + ci.IncludePatterns = append(ci.IncludePatterns, ip...) } type CopyExcludePatterns []string @@ -143,7 +143,7 @@ func WithExcludePatterns(excludePatterns []string) CopyExcludePatterns { } func (ep CopyExcludePatterns) SetCopyOption(ci *llb.CopyInfo) { - ci.ExcludePatterns = ([]string)(ep) + ci.ExcludePatterns = append(ci.ExcludePatterns, ep...) } type Target string