Skip to content

Commit f14c216

Browse files
petershinbrianchandotcom
authored andcommitted
LPS-93258 Update hostname in yarn.lock (see yarnpkg/yarn#5892)
1 parent e792e3e commit f14c216

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

modules/util.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@ setUpYarn {
102102
scriptFile = new File(projectDir, "yarn-1.13.0.js")
103103

104104
doFirst {
105+
String registry = project.findProperty("nodejs.npm.ci.registry")
106+
107+
if (yarnLockFile.exists() && registry) {
108+
logger.lifecycle "Using registry {}", registry
109+
110+
yarnLockFile.text = yarnLockFile.text.replaceAll("https://registry.yarnpkg.com", registry)
111+
}
112+
105113
if (userNodeModulesCacheYarnLockFile.exists() && yarnLockFile.exists() && (userNodeModulesCacheYarnLockFile.text == yarnLockFile.text)) {
106114
logger.lifecycle "Restoring node_modules_cache from {}", userNodeModulesCacheDir
107115

0 commit comments

Comments
 (0)