From 073ecaac66f277b7eef74f0b5610352d55e4d5a9 Mon Sep 17 00:00:00 2001 From: Joshua Pan Date: Sat, 12 May 2018 22:21:02 -0400 Subject: [PATCH] provision: Give concrete NFS error message on older OSX versions. --- tools/setup/generate_zulip_bots_static_files | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/setup/generate_zulip_bots_static_files b/tools/setup/generate_zulip_bots_static_files index 3baf00ada9..1ad95e68e3 100755 --- a/tools/setup/generate_zulip_bots_static_files +++ b/tools/setup/generate_zulip_bots_static_files @@ -17,7 +17,14 @@ from zulip_bots.lib import get_bots_directory_path bots_dir = os.path.join(settings.STATIC_ROOT, 'generated/bots') if os.path.isdir(bots_dir): # delete old static files, they could be outdated - shutil.rmtree(bots_dir) + try: + shutil.rmtree(bots_dir) + except OSError: + print("There was a permission error with Vagrant's NFS file sharing on old versions of " + + "OSX. You can fix this by upgrading to the latest OSX High Sierra, or work around it " + + "by giving read/write permissions to your /zulip folder to everyone.") + sys.exit(1) + os.makedirs(bots_dir, exist_ok=True)