Permalink
Browse files

provision: Fix node_modules being owned by root.

A bug in the node_cache.py code resulted in the node_modules symlink
in Zulip development environments being incorrectly owned by root.
This causes that bug to be fixed the next time a user provisions.
  • Loading branch information...
timabbott committed Sep 28, 2016
1 parent 9c0c6c0 commit cd5b38f5d8bdcc1771ad794f37262a61843c56c0
Showing with 4 additions and 0 deletions.
  1. +4 −0 tools/provision.py
@@ -204,6 +204,10 @@ def main():
# This is a wrapper around `npm install`, which we run last since
# it can often fail due to network issues beyond our control.
try:
# Hack: We remove `node_modules` as root to work around an
# issue with the symlinks being improperly owned by root.
if os.path.islink("node_modules"):
run(["sudo", "rm", "-f", "node_modules"])
setup_node_modules()
except subprocess.CalledProcessError:
print(WARNING + "`npm install` failed; retrying..." + ENDC)

0 comments on commit cd5b38f

Please sign in to comment.