Skip to content

Commit

Permalink
FileCopier.GetMatches() returns an error message that contains missin…
Browse files Browse the repository at this point in the history
…g path (#22)

Signed-off-by: Dmitri Dolguikh <[email protected]>
  • Loading branch information
dmitri-d authored Jul 28, 2023
1 parent 5c3d9e5 commit b44a11c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions changelog/v0.1.1/better-error-message.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
changelog:
- type: NON_USER_FACING
issueLink:
resolvesIssue: false
description: FileCopier.GetMatches() returns an error message that contains missing path now.
6 changes: 3 additions & 3 deletions pkg/manager/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
)

/*
This interface is used to abstract away the methods which require ENV vars or other
system things. This is mostly for unit testing purposes.
This interface is used to abstract away the methods which require ENV vars or other
system things. This is mostly for unit testing purposes.
*/
type FileCopier interface {
Copy(src, dst string) (int64, error)
Expand All @@ -37,7 +37,7 @@ func (c *copier) GetMatches(copyPat []string, dir string) ([]string, error) {
for _, pat := range copyPat {
matches, err := zglob.Glob(filepath.Join(dir, pat))
if err != nil {
return nil, eris.Wrapf(err, "Error! glob match failure")
return nil, eris.Wrapf(err, "Error! glob match failure for path: %s", filepath.Join(dir, pat))
}
// Filter out all matches which contain a vendor folder, those are leftovers from a previous run.
// Might be worth clearing the vendor folder before every run.
Expand Down

0 comments on commit b44a11c

Please sign in to comment.