Allow .dockerignore to ignore everything
Change CLI error msg because it was too specific and didn't make sense when there were errors not related to inaccessible files. Removed some log.Error() calls since they're not really errors we should log. Returning the error will be enough. Closes: #13417 Signed-off-by: Doug Davis <dug@us.ibm.com>
This commit is contained in:
parent
0381b5ceb9
commit
17f257a938
1 changed files with 1 additions and 2 deletions
|
@ -40,7 +40,6 @@ func CleanPatterns(patterns []string) ([]string, [][]string, bool, error) {
|
|||
}
|
||||
if Exclusion(pattern) {
|
||||
if len(pattern) == 1 {
|
||||
logrus.Errorf("Illegal exclusion pattern: %s", pattern)
|
||||
return nil, nil, false, errors.New("Illegal exclusion pattern: !")
|
||||
}
|
||||
exceptions = true
|
||||
|
@ -94,7 +93,6 @@ func OptimizedMatches(file string, patterns []string, patDirs [][]string) (bool,
|
|||
|
||||
match, err := filepath.Match(pattern, file)
|
||||
if err != nil {
|
||||
logrus.Errorf("Error matching: %s (pattern: %s)", file, pattern)
|
||||
return false, err
|
||||
}
|
||||
|
||||
|
@ -114,6 +112,7 @@ func OptimizedMatches(file string, patterns []string, patDirs [][]string) (bool,
|
|||
if matched {
|
||||
logrus.Debugf("Skipping excluded path: %s", file)
|
||||
}
|
||||
|
||||
return matched, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue