Skip to content

Commit

Permalink
Check for Mac, use umount instead of fusermount (#1915)
Browse files Browse the repository at this point in the history
* Check for Mac, use umount instead of fusermount

* Update copy_environment.py
  • Loading branch information
engelke committed Dec 17, 2018
1 parent db2cc44 commit 78a7a2d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion composer/tools/copy_environment.py
Expand Up @@ -33,6 +33,7 @@
import contextlib
import json
import os
import platform
import re
import shutil
import subprocess
Expand Down Expand Up @@ -542,7 +543,11 @@ def import_data(
if proxy_subprocess:
proxy_subprocess.kill()
if fuse_dir:
subprocess.call(["fusermount", "-u", fuse_dir])
if platform.system().lower().startswith('darwin'):
# Mac OSX does not have fusermount
subprocess.call(["umount", fuse_dir])
else:
subprocess.call(["fusermount", "-u", fuse_dir])
if tmp_dir_name:
shutil.rmtree(tmp_dir_name)

Expand Down

0 comments on commit 78a7a2d

Please sign in to comment.