Skip to content

Commit

Permalink
LPS-93258 Update hostname in yarn.lock (see yarnpkg/yarn#5892)
Browse files Browse the repository at this point in the history
  • Loading branch information
petershin authored and brianchandotcom committed Aug 1, 2019
1 parent e792e3e commit f14c216
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/util.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ setUpYarn {
scriptFile = new File(projectDir, "yarn-1.13.0.js")

doFirst {
String registry = project.findProperty("nodejs.npm.ci.registry")

if (yarnLockFile.exists() && registry) {
logger.lifecycle "Using registry {}", registry

yarnLockFile.text = yarnLockFile.text.replaceAll("https://registry.yarnpkg.com", registry)
}

if (userNodeModulesCacheYarnLockFile.exists() && yarnLockFile.exists() && (userNodeModulesCacheYarnLockFile.text == yarnLockFile.text)) {
logger.lifecycle "Restoring node_modules_cache from {}", userNodeModulesCacheDir

Expand Down

0 comments on commit f14c216

Please sign in to comment.