1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-01-03 21:56:44 +00:00

use prepared env for borg umount

(cherry picked from commit b88da10641)
This commit is contained in:
Thomas Waldmann 2017-09-23 22:38:26 +02:00
parent 3b20c18c3b
commit d6f810560c

View file

@ -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)