Add better error handling for filesystem

This commit is contained in:
Dane Everitt
2021-04-17 13:29:18 -07:00
parent a0ae5fd131
commit 0676a82a21
8 changed files with 86 additions and 43 deletions

View File

@@ -20,7 +20,7 @@ func (fs *Filesystem) IsIgnored(paths ...string) error {
return err
}
if fs.denylist.MatchesPath(sp) {
return &Error{code: ErrCodeDenylistFile, path: p, resolved: sp}
return errors.WithStack(&Error{code: ErrCodeDenylistFile, path: p, resolved: sp})
}
}
return nil