1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-01-31 19:52:22 +00:00

Properly quote repo path in borg init output

Instead of printing this invalid command:

    borg upgrade --disable-tam '/path/test'repo'

print this valid one:

    borg upgrade --disable-tam '/path/test'"'"'repo'

(cherry picked from commit e780660830)
This commit is contained in:
Josh Holland 2017-12-22 21:09:49 +00:00 committed by Thomas Waldmann
parent 20f9f5e39c
commit b263888a4f

View file

@ -279,10 +279,10 @@ def do_init(self, args, repository):
'errors if written to with an older version (up to and including Borg 1.0.8).\n'
'\n'
'If you want to use these older versions, you can disable the check by running:\n'
'borg upgrade --disable-tam \'%s\'\n'
'borg upgrade --disable-tam %s\n'
'\n'
'See https://borgbackup.readthedocs.io/en/stable/changes.html#pre-1-0-9-manifest-spoofing-vulnerability '
'for details about the security implications.', path)
'for details about the security implications.', shlex.quote(path))
return self.exit_code
@with_repository(exclusive=True, manifest=False)