mirror of
https://github.com/borgbackup/borg.git
synced 2025-01-31 03:31:41 +00:00
fix badly named environment variable, fixes #503
added: BORG_DELETE_I_KNOW_WHAT_I_AM_DOING for the check in "borg delete"
This commit is contained in:
parent
ae4a56997f
commit
57b913bc88
4 changed files with 5 additions and 1 deletions
|
@ -351,7 +351,7 @@ def do_delete(self, args):
|
|||
msg.append("Type 'YES' if you understand this and want to continue: ")
|
||||
msg = '\n'.join(msg)
|
||||
if not yes(msg, false_msg="Aborting.", default_notty=False,
|
||||
env_var_override='BORG_CHECK_I_KNOW_WHAT_I_AM_DOING', truish=('YES', )):
|
||||
env_var_override='BORG_DELETE_I_KNOW_WHAT_I_AM_DOING', truish=('YES', )):
|
||||
self.exit_code = EXIT_ERROR
|
||||
return self.exit_code
|
||||
repository.destroy()
|
||||
|
|
|
@ -199,6 +199,7 @@ class ArchiverTestCaseBase(BaseTestCase):
|
|||
|
||||
def setUp(self):
|
||||
os.environ['BORG_CHECK_I_KNOW_WHAT_I_AM_DOING'] = '1'
|
||||
os.environ['BORG_DELETE_I_KNOW_WHAT_I_AM_DOING'] = '1'
|
||||
self.archiver = not self.FORK_DEFAULT and Archiver() or None
|
||||
self.tmpdir = tempfile.mkdtemp()
|
||||
self.repository_path = os.path.join(self.tmpdir, 'repository')
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
def repo_url(request, tmpdir):
|
||||
os.environ['BORG_PASSPHRASE'] = '123456'
|
||||
os.environ['BORG_CHECK_I_KNOW_WHAT_I_AM_DOING'] = '1'
|
||||
os.environ['BORG_DELETE_I_KNOW_WHAT_I_AM_DOING'] = '1'
|
||||
os.environ['BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK'] = '1'
|
||||
os.environ['BORG_KEYS_DIR'] = str(tmpdir.join('keys'))
|
||||
os.environ['BORG_CACHE_DIR'] = str(tmpdir.join('cache'))
|
||||
|
|
|
@ -72,6 +72,8 @@ Some "yes" sayers (if set, they automatically confirm that you really want to do
|
|||
For "Warning: The repository at location ... was previously located at ..."
|
||||
BORG_CHECK_I_KNOW_WHAT_I_AM_DOING
|
||||
For "Warning: 'check --repair' is an experimental feature that might result in data loss."
|
||||
BORG_DELETE_I_KNOW_WHAT_I_AM_DOING
|
||||
For "You requested to completely DELETE the repository *including* all archives it contains: "
|
||||
|
||||
Directories:
|
||||
BORG_KEYS_DIR
|
||||
|
|
Loading…
Reference in a new issue