Fix escaped environment variable in configuration #549
No reviewers
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#549
Loading…
Reference in New Issue
No description provided.
Delete Branch "essembeh/borgmatic:master"
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?
not to resolve it and remove the escape char
\
@ -12,1 +12,3 @@
name, default = matcher.group("name"), matcher.group("default")
if matcher.group('escape') is not None:
# in case of escaped envvar, unescape it
return matcher.group('variable')
There's a super edge case where an escaped
\${FOO:-default}
would not be treated properly, but probably not worth dealing with given how unlikely it is to occur in the wild.