Skip to content

Commit 78a7a2d

Browse files
authored
Check for Mac, use umount instead of fusermount (#1915)
* Check for Mac, use umount instead of fusermount * Update copy_environment.py
1 parent db2cc44 commit 78a7a2d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

composer/tools/copy_environment.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import contextlib
3434
import json
3535
import os
36+
import platform
3637
import re
3738
import shutil
3839
import subprocess
@@ -542,7 +543,11 @@ def import_data(
542543
if proxy_subprocess:
543544
proxy_subprocess.kill()
544545
if fuse_dir:
545-
subprocess.call(["fusermount", "-u", fuse_dir])
546+
if platform.system().lower().startswith('darwin'):
547+
# Mac OSX does not have fusermount
548+
subprocess.call(["umount", fuse_dir])
549+
else:
550+
subprocess.call(["fusermount", "-u", fuse_dir])
546551
if tmp_dir_name:
547552
shutil.rmtree(tmp_dir_name)
548553

0 commit comments

Comments
 (0)