node_cache: Preserve symlinks when copying an old node_modules tree.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg 2019-10-06 12:53:15 -07:00 committed by Tim Abbott
parent f92e9e8693
commit 9182293d50
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ def do_yarn_install(target_path, yarn_args, success_stamp, stdout=None, stderr=N
# Copy the existing node_modules to speed up install
if os.path.exists("node_modules"):
shutil.copytree("node_modules/", cached_node_modules)
shutil.copytree("node_modules/", cached_node_modules, symlinks=True)
if os.environ.get('CUSTOM_CA_CERTIFICATES'):
run([YARN_BIN, "config", "set", "cafile", os.environ['CUSTOM_CA_CERTIFICATES']],
stdout=stdout, stderr=stderr)