提交 0c203ce8 编写于 作者: A Alex Dima

Respect usage of yarn with --ignore-optional

上级 7dbe3bfa
......@@ -17,8 +17,17 @@ function yarnInstall(location, opts) {
opts.cwd = location;
opts.stdio = 'inherit';
const raw = process.env['npm_config_argv'] || '{}';
const argv = JSON.parse(raw);
const original = argv.original || [];
const args = ['install'];
if (original.indexOf('--ignore-optional') > -1) {
args.push('--ignore-optional');
}
console.log('Installing dependencies in \'%s\'.', location);
const result = cp.spawnSync(yarn, ['install'], opts);
const result = cp.spawnSync(yarn, args, opts);
if (result.error || result.status !== 0) {
process.exit(1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册