From df46eef269f928769fe6c1b307a2a50f6d23aed3 Mon Sep 17 00:00:00 2001 From: Orsiris de Jong Date: Sat, 27 May 2023 18:47:09 +0200 Subject: [PATCH] Make sure encrypted env variables get expanded properly --- npbackup/core/runner.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/npbackup/core/runner.py b/npbackup/core/runner.py index ff26b87..f432c59 100644 --- a/npbackup/core/runner.py +++ b/npbackup/core/runner.py @@ -355,15 +355,15 @@ class NPBackupRunner: except KeyError: encrypted_env_variables = [] - env_variables += encrypted_env_variables - expanded_env_vars = {} try: if env_variables: - for env_variable in env_variables: + for env_variable in env_variables + encrypted_env_variables: if env_variable: try: key, value = env_variable.split("=") + value = os.path.expanduser(value) + value = os.path.expandvars(value) expanded_env_vars[key.strip()] = value.strip() except ValueError: logger.error(