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)