Browse Source

Merge pull request #504 from ThomasWaldmann/fix-503

fix badly named environment variable, fixes #503
TW 9 years ago
parent
commit
8cb901b2f1
4 changed files with 5 additions and 1 deletions
  1. 1 1
      borg/archiver.py
  2. 1 0
      borg/testsuite/archiver.py
  3. 1 0
      borg/testsuite/benchmark.py
  4. 2 0
      docs/usage.rst

+ 1 - 1
borg/archiver.py

@@ -351,7 +351,7 @@ class Archiver:
                 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()

+ 1 - 0
borg/testsuite/archiver.py

@@ -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')

+ 1 - 0
borg/testsuite/benchmark.py

@@ -17,6 +17,7 @@ from .archiver import changedir, cmd
 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'))

+ 2 - 0
docs/usage.rst

@@ -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