From 71e25756f2e7362c0de511a32b30967f35ceaf0b Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sat, 24 Jan 2026 16:17:32 -0800 Subject: [PATCH] Fix a regression in which the KeePassXC credential hook password prompt was invisible (#1245). --- NEWS | 1 + borgmatic/execute.py | 2 +- tests/unit/test_execute.py | 12 ++++++------ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index d1bbbbb3..281b0d6f 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ * #1241: For the "recreate" action, actually pass the "--dry-run" flag through to Borg instead of just skipping the Borg call. * #1242: Fix a regression in which the "spot" check hung while collecting archive contents. + * #1245: Fix a regression in which the KeePassXC credential hook password prompt was invisible. 2.1.0 * TL;DR: Many logging, memory, and performance improvements. Mind those breaking changes! diff --git a/borgmatic/execute.py b/borgmatic/execute.py index a03015d9..1bbe1bd3 100644 --- a/borgmatic/execute.py +++ b/borgmatic/execute.py @@ -612,7 +612,7 @@ def execute_command_and_capture_output( command, stdin=input_file, stdout=subprocess.PIPE, - stderr=subprocess.PIPE, + stderr=subprocess.PIPE if capture_stderr else None, shell=shell, env=environment, cwd=working_directory, diff --git a/tests/unit/test_execute.py b/tests/unit/test_execute.py index dcc105f1..308e759e 100644 --- a/tests/unit/test_execute.py +++ b/tests/unit/test_execute.py @@ -1385,7 +1385,7 @@ def test_execute_command_and_capture_output_returns_stdout(): full_command, stdin=None, stdout=subprocess.PIPE, - stderr=subprocess.PIPE, + stderr=None, shell=False, env=None, cwd=None, @@ -1430,7 +1430,7 @@ def test_execute_command_and_capture_output_returns_output_when_process_error_is full_command, stdin=None, stdout=subprocess.PIPE, - stderr=subprocess.PIPE, + stderr=None, shell=False, env=None, cwd=None, @@ -1452,7 +1452,7 @@ def test_execute_command_and_capture_output_raises_when_command_errors(): full_command, stdin=None, stdout=subprocess.PIPE, - stderr=subprocess.PIPE, + stderr=None, shell=False, env=None, cwd=None, @@ -1474,7 +1474,7 @@ def test_execute_command_and_capture_output_with_shell_returns_output(): 'foo bar', stdin=None, stdout=subprocess.PIPE, - stderr=subprocess.PIPE, + stderr=None, shell=True, env=None, cwd=None, @@ -1496,7 +1496,7 @@ def test_execute_command_and_capture_output_with_enviroment_returns_output(): full_command, stdin=None, stdout=subprocess.PIPE, - stderr=subprocess.PIPE, + stderr=None, shell=False, env={'a': 'b'}, cwd=None, @@ -1524,7 +1524,7 @@ def test_execute_command_and_capture_output_returns_output_with_working_director full_command, stdin=None, stdout=subprocess.PIPE, - stderr=subprocess.PIPE, + stderr=None, shell=False, env=None, cwd='/working',