regression: An empty line in a patterns_from file causes error ('Invalid pattern:', '') #970
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
Run backups based on a separate patterns file injected with
patterns_from. For clarity, separate "sections" in my pattern file have had an empty line between them. This empty line is now as of today interpreted as a pattern which causes borgmatic to exit with('Invalid pattern:', '')Steps to reproduce
Use a patterns.lst file such as:
Run it via a config containing:
Actual behavior
Expected behavior
Ignore the empty pattern line as before.
Other notes / implementation ideas
Based on timing I'm betting this came with release
1.9.6.borgmatic version
1.9.6
borgmatic installation method
ghcr.io/borgmatic-collective/borgmatic:latest
Borg version
N/A
Python version
N/A
Database version (if applicable)
N/A
Operating system and version
N/A
Yeah, this is definitely a regression introduced by 1.9.6 and specifically by #962. Thanks for taking the time to file it! I can work on a fix, but in the meantime, you can either downgrade to borgmatic 1.9.5 or replace your blank lines with comments (just
#by itself on a line would do it).This is fixed in main now and will be part of the next release. (For the record, the same problem also applied to excludes.) Thanks again!
Released in borgmatic 1.9.7!