From 9e481e353a30d178f19a536612d3658a2f385ea2 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 27 Aug 2019 15:32:07 -0700 Subject: [PATCH] .yarnrc: Set ignore-scripts true. Follow up to #13065, to keep manual yarn invocations consistent with our automated ones. Signed-off-by: Anders Kaseorg --- .yarnrc | 1 + scripts/lib/node_cache.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .yarnrc diff --git a/.yarnrc b/.yarnrc new file mode 100644 index 0000000000..5455c6c5d3 --- /dev/null +++ b/.yarnrc @@ -0,0 +1 @@ +ignore-scripts true diff --git a/scripts/lib/node_cache.py b/scripts/lib/node_cache.py index 7674470dcb..78c2c0c244 100644 --- a/scripts/lib/node_cache.py +++ b/scripts/lib/node_cache.py @@ -77,6 +77,7 @@ def do_yarn_install(target_path, yarn_args, success_stamp, stdout=None, stderr=N os.makedirs(target_path, exist_ok=True) shutil.copy('package.json', target_path) shutil.copy("yarn.lock", target_path) + shutil.copy(".yarnrc", target_path) cached_node_modules = os.path.join(target_path, 'node_modules') print("Cached version not found! Installing node modules.") @@ -86,7 +87,7 @@ def do_yarn_install(target_path, yarn_args, success_stamp, stdout=None, stderr=N if os.environ.get('CUSTOM_CA_CERTIFICATES'): run([YARN_BIN, "config", "set", "cafile", os.environ['CUSTOM_CA_CERTIFICATES']], stdout=stdout, stderr=stderr) - run([YARN_BIN, "install", "--non-interactive", "--frozen-lockfile", "--ignore-scripts"] + yarn_args, + run([YARN_BIN, "install", "--non-interactive", "--frozen-lockfile"] + yarn_args, cwd=target_path, stdout=stdout, stderr=stderr) with open(success_stamp, 'w'): pass