mirror of https://github.com/zulip/zulip.git
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.
This commit is contained in:
parent
9c0c6c0c23
commit
cd5b38f5d8
|
@ -204,6 +204,10 @@ def main():
|
||||||
# This is a wrapper around `npm install`, which we run last since
|
# This is a wrapper around `npm install`, which we run last since
|
||||||
# it can often fail due to network issues beyond our control.
|
# it can often fail due to network issues beyond our control.
|
||||||
try:
|
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()
|
setup_node_modules()
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
print(WARNING + "`npm install` failed; retrying..." + ENDC)
|
print(WARNING + "`npm install` failed; retrying..." + ENDC)
|
||||||
|
|
Loading…
Reference in New Issue