From f6dd664a1e44d7855472decb67e34e02757814a9 Mon Sep 17 00:00:00 2001 From: Joakim Klevmo Hansen Date: Fri, 18 Sep 2020 09:51:44 +0200 Subject: [PATCH] Keep existing env vars when specifying PASSWORD_STORE_DIR --- misc/userscripts/qute-pass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/userscripts/qute-pass b/misc/userscripts/qute-pass index 9bd199ccd..16d359f25 100755 --- a/misc/userscripts/qute-pass +++ b/misc/userscripts/qute-pass @@ -137,7 +137,9 @@ def find_pass_candidates(domain, password_store_path): def _run_pass(pass_arguments, encoding, password_store): # The executable is conveniently named after it's mode [pass|gopass]. pass_command = [arguments.mode] - process = subprocess.run(pass_command + pass_arguments, env={'PASSWORD_STORE_DIR': password_store}, stdout=subprocess.PIPE) + env = os.environ.copy() + env['PASSWORD_STORE_DIR'] = password_store + process = subprocess.run(pass_command + pass_arguments, env=env, stdout=subprocess.PIPE) return process.stdout.decode(encoding).strip()