Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileCopier.GetMatches() returns an error message that contains missing path #22

Merged
merged 2 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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