mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 16:14:02 +00:00
node_cache: Don’t retry copying node_modules; let yarn do its thing.
`copytree` throws an error if the target already exists, and we don’t really want to rerun the copy anyway. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
committed by
Tim Abbott
parent
d4443bc4f8
commit
d6377b00c0
@@ -82,7 +82,7 @@ def do_yarn_install(target_path, yarn_args, success_stamp, stdout=None, stderr=N
|
|||||||
print("Cached version not found! Installing node modules.")
|
print("Cached version not found! Installing node modules.")
|
||||||
|
|
||||||
# Copy the existing node_modules to speed up install
|
# Copy the existing node_modules to speed up install
|
||||||
if os.path.exists("node_modules"):
|
if os.path.exists("node_modules") and not os.path.exists(cached_node_modules):
|
||||||
shutil.copytree("node_modules/", cached_node_modules, symlinks=True)
|
shutil.copytree("node_modules/", cached_node_modules, symlinks=True)
|
||||||
if os.environ.get('CUSTOM_CA_CERTIFICATES'):
|
if os.environ.get('CUSTOM_CA_CERTIFICATES'):
|
||||||
run([YARN_BIN, "config", "set", "cafile", os.environ['CUSTOM_CA_CERTIFICATES']],
|
run([YARN_BIN, "config", "set", "cafile", os.environ['CUSTOM_CA_CERTIFICATES']],
|
||||||
|
Reference in New Issue
Block a user