Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

node_cache: Remove node_modules/.cache when copying.

Anders Kaseorg3cb7d3d1dc90
diff --git a/scripts/lib/node_cache.py b/scripts/lib/node_cache.py
index afd6cfca7eb..5857d5a74a5 100644
--- a/scripts/lib/node_cache.py
+++ b/scripts/lib/node_cache.py
@@ -88,6 +88,8 @@ def do_yarn_install(
# Copy the existing node_modules to speed up install
if os.path.exists("node_modules") and not os.path.exists(cached_node_modules):
shutil.copytree("node_modules/", cached_node_modules, symlinks=True)
+ if os.path.isdir(os.path.join(cached_node_modules, ".cache")):
+ shutil.rmtree(os.path.join(cached_node_modules, ".cache"))
if os.environ.get("CUSTOM_CA_CERTIFICATES"):
run([YARN_BIN, "config", "set", "cafile", os.environ["CUSTOM_CA_CERTIFICATES"]])
run(