Skip to content

Commit

Permalink
provision: Fix node_modules being owned by root.
Browse files Browse the repository at this point in the history
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 cd5b38f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/provision.py
Expand Up @@ -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)
Expand Down

0 comments on commit cd5b38f

Please sign in to comment.