From 8aaf9b1426ad7e6b00affd59a17e851446f8277d Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 24 May 2017 10:35:00 -0700 Subject: [PATCH] Revert "Fix emoji cache setup when not using provision.py." This reverts commit ab2cfadcaa508372002e7c5b611bc0fe443c65e0. This broke production installation. --- tools/lib/provision.py | 4 ++++ tools/setup/emoji/build_emoji | 7 +------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/lib/provision.py b/tools/lib/provision.py index 1419387e17..40bab9fcf4 100755 --- a/tools/lib/provision.py +++ b/tools/lib/provision.py @@ -214,6 +214,10 @@ def main(options): # create linecoverage directory`var/node-coverage` run(["mkdir", "-p", NODE_TEST_COVERAGE_DIR_PATH]) + if not os.path.isdir(EMOJI_CACHE_PATH): + run(["sudo", "mkdir", EMOJI_CACHE_PATH]) + run(["sudo", "chown", "%s:%s" % (user_id, user_id), EMOJI_CACHE_PATH]) + run(["tools/setup/emoji/download-emoji-data"]) run(["tools/setup/emoji/build_emoji"]) run(["tools/setup/build_pygments_data.py"]) run(["scripts/setup/generate_secrets.py", "--development"]) diff --git a/tools/setup/emoji/build_emoji b/tools/setup/emoji/build_emoji index 9cf1672f78..4e7b72aa4b 100755 --- a/tools/setup/emoji/build_emoji +++ b/tools/setup/emoji/build_emoji @@ -82,12 +82,7 @@ EMOJI_POS_INFO_TEMPLATE = """\ } """ -# Make and enter emoji directory -user_id = os.getuid() -if not os.path.isdir(EMOJI_CACHE_PATH): - run(["sudo", "mkdir", EMOJI_CACHE_PATH]) -run(["sudo", "chown", "%s:%s" % (user_id, user_id), EMOJI_CACHE_PATH]) -run(["tools/setup/emoji/download-emoji-data"]) +# change directory os.chdir(EMOJI_SCRIPT_DIR_PATH) if 'TRAVIS' in os.environ: