mirror of
https://github.com/containers/skopeo.git
synced 2025-08-01 23:07:51 +00:00
Fix error handling on invalid regex
Say that the regex is the cause, include it in the error message, and don't continue as if the compilation succeeded. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
c103d65284
commit
8b4b954332
@ -344,8 +344,11 @@ func imagesToCopyFromRegistry(registryName string, cfg registrySyncConfig, sourc
|
|||||||
|
|
||||||
tagReg, err := regexp.Compile(tagRegex)
|
tagReg, err := regexp.Compile(tagRegex)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
repoLogger.Error("Error processing repo, skipping")
|
repoLogger.WithFields(logrus.Fields{
|
||||||
|
"regex": tagRegex,
|
||||||
|
}).Error("Error parsing regex, skipping")
|
||||||
logrus.Error(err)
|
logrus.Error(err)
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
repoLogger.Info("Querying registry for image tags")
|
repoLogger.Info("Querying registry for image tags")
|
||||||
|
Loading…
Reference in New Issue
Block a user