Fix escaped environment variable in configuration #549

Merged
witten merged 1 commit from :master into master 2022-06-23 17:16:11 +00:00
Contributor
  • when an env variable is escaped in the configuration file, we expect
    not to resolve it and remove the escape char \
- when an env variable is escaped in the configuration file, we expect not to resolve it and remove the escape char `\`
- when an env variable is escaped in the configuration file, we expect
  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')
Owner

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.

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.
witten merged commit c664c6b17b into master 2022-06-23 17:16:11 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
borgmatic-collective/borgmatic!549
No description provided.