Revert "Fix emoji cache setup when not using provision.py."

This reverts commit ab2cfadcaa.

This broke production installation.
This commit is contained in:
Tim Abbott 2017-05-24 10:35:00 -07:00
parent c0f2036435
commit 8aaf9b1426
2 changed files with 5 additions and 6 deletions

View File

@ -214,6 +214,10 @@ def main(options):
# create linecoverage directory`var/node-coverage` # create linecoverage directory`var/node-coverage`
run(["mkdir", "-p", NODE_TEST_COVERAGE_DIR_PATH]) 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/emoji/build_emoji"])
run(["tools/setup/build_pygments_data.py"]) run(["tools/setup/build_pygments_data.py"])
run(["scripts/setup/generate_secrets.py", "--development"]) run(["scripts/setup/generate_secrets.py", "--development"])

View File

@ -82,12 +82,7 @@ EMOJI_POS_INFO_TEMPLATE = """\
} }
""" """
# Make and enter emoji directory # change 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"])
os.chdir(EMOJI_SCRIPT_DIR_PATH) os.chdir(EMOJI_SCRIPT_DIR_PATH)
if 'TRAVIS' in os.environ: if 'TRAVIS' in os.environ: