[6.x] [dev/build] use --prefer-offline flag when installing modules (#26198) (#26218)

Backports the following commits to 6.x:
 - [dev/build] use --prefer-offline flag when installing modules  (#26198)
This commit is contained in:
Spencer 2018-11-26 20:24:52 -08:00 committed by GitHub
parent a246132abe
commit 83511cd99e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,7 +25,7 @@ export const InstallDependenciesTask = {
async run(config, log, build) {
// We're using --no-bin-links to support systems that don't have symlinks.
// This is commonly seen in shared folders on virtual machines
const args = ['--production', '--ignore-optional', '--frozen-lockfile', '--no-bin-links'];
const args = ['--production', '--ignore-optional', '--frozen-lockfile', '--no-bin-links', '--prefer-offline'];
await exec(log, 'yarn', args, {
cwd: build.resolvePath(),