From d6f810560cd036d2e60fe3485e849dba48010a38 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 23 Sep 2017 22:38:26 +0200 Subject: [PATCH] use prepared env for borg umount (cherry picked from commit b88da1064155f159163a78cfbafa1adc0eb5ec3a) --- src/borg/helpers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/borg/helpers.py b/src/borg/helpers.py index 647a054aa..54ea00fc8 100644 --- a/src/borg/helpers.py +++ b/src/borg/helpers.py @@ -2343,7 +2343,8 @@ def is_terminal(fd=sys.stdout): def umount(mountpoint): + env = prepare_subprocess_env(system=True) try: - return subprocess.call(['fusermount', '-u', mountpoint]) + return subprocess.call(['fusermount', '-u', mountpoint], env=env) except FileNotFoundError: - return subprocess.call(['umount', mountpoint]) + return subprocess.call(['umount', mountpoint], env=env)