Răsfoiți Sursa

use prepared env for borg umount

(cherry picked from commit b88da1064155f159163a78cfbafa1adc0eb5ec3a)
Thomas Waldmann 7 ani în urmă
părinte
comite
d6f810560c
1 a modificat fișierele cu 3 adăugiri și 2 ștergeri
  1. 3 2
      src/borg/helpers.py

+ 3 - 2
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)