浏览代码

BORG_DEBUG_PASSPHRASE: also show "other" env vars, docs

Thomas Waldmann 3 月之前
父节点
当前提交
bcb178418e
共有 2 个文件被更改,包括 5 次插入0 次删除
  1. 2 0
      docs/usage/general/environment.rst.inc
  2. 3 0
      src/borg/helpers/passphrase.py

+ 2 - 0
docs/usage/general/environment.rst.inc

@@ -36,6 +36,8 @@ General:
         Main usecase for this is to automate fully ``borg change-passphrase``.
         Main usecase for this is to automate fully ``borg change-passphrase``.
     BORG_DISPLAY_PASSPHRASE
     BORG_DISPLAY_PASSPHRASE
         When set, use the value to answer the "display the passphrase for verification" question when defining a new passphrase for encrypted repositories.
         When set, use the value to answer the "display the passphrase for verification" question when defining a new passphrase for encrypted repositories.
+    BORG_DEBUG_PASSPHRASE
+        When set to YES, display debugging information that includes passphrases used and passphrase related env vars set.
     BORG_EXIT_CODES
     BORG_EXIT_CODES
         When set to "modern", the borg process will return more specific exit codes (rc).
         When set to "modern", the borg process will return more specific exit codes (rc).
         When set to "legacy", the borg process will return rc 2 for all errors, 1 for all warnings, 0 for success.
         When set to "legacy", the borg process will return rc 2 for all errors, 1 for all warnings, 0 for success.

+ 3 - 0
src/borg/helpers/passphrase.py

@@ -143,6 +143,9 @@ class Passphrase(str):
                 {fmt_var("BORG_PASSPHRASE")}
                 {fmt_var("BORG_PASSPHRASE")}
                 {fmt_var("BORG_PASSCOMMAND")}
                 {fmt_var("BORG_PASSCOMMAND")}
                 {fmt_var("BORG_PASSPHRASE_FD")}
                 {fmt_var("BORG_PASSPHRASE_FD")}
+                {fmt_var("BORG_OTHER_PASSPHRASE")}
+                {fmt_var("BORG_OTHER_PASSCOMMAND")}
+                {fmt_var("BORG_OTHER_PASSPHRASE_FD")}
                 """
                 """
             )
             )
             print(passphrase_info, file=sys.stderr)
             print(passphrase_info, file=sys.stderr)