KT-34468 Yarn. Lock file check at the beginning
This commit is contained in:
committed by
Ilya Goncharov
parent
8cd23dfc9a
commit
35e3691d6c
+5
-3
@@ -98,8 +98,11 @@ abstract class YarnBasics : NpmApi {
|
|||||||
nodeWorkDir: File,
|
nodeWorkDir: File,
|
||||||
srcDependenciesList: Collection<NpmDependency>
|
srcDependenciesList: Collection<NpmDependency>
|
||||||
) {
|
) {
|
||||||
val yarnLock = nodeWorkDir.resolve("yarn.lock")
|
val yarnLock = nodeWorkDir
|
||||||
if (yarnLock.isFile) {
|
.resolve("yarn.lock")
|
||||||
|
.takeIf { it.isFile }
|
||||||
|
?: return
|
||||||
|
|
||||||
val byKey = YarnLock.parse(yarnLock).entries.associateBy { it.dependencyKey }
|
val byKey = YarnLock.parse(yarnLock).entries.associateBy { it.dependencyKey }
|
||||||
val visited = mutableMapOf<NpmDependency, NpmDependency>()
|
val visited = mutableMapOf<NpmDependency, NpmDependency>()
|
||||||
|
|
||||||
@@ -152,4 +155,3 @@ abstract class YarnBasics : NpmApi {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user