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:
parent
3b20c18c3b
commit
d6f810560c
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue