Skip to content

Commit 90ec14e

Browse files
committed
chore(yarn): Prefer also over let if the return value is not used
Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 9101dd1 commit 90ec14e

File tree

1 file changed

+2
-2
lines changed
  • plugins/package-managers/node/src/main/kotlin/yarn

1 file changed

+2
-2
lines changed

Diff for: plugins/package-managers/node/src/main/kotlin/yarn/Yarn.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ open class Yarn(
255255
projectDirs,
256256
ancestorModuleDirs = dependencyModuleDirPath.subList(1, dependencyModuleDirPath.size),
257257
ancestorModuleIds = ancestorModuleIds + moduleId
258-
)?.let { dependencies += it }
258+
)?.also { dependencies += it }
259259

260260
return@forEach
261261
}
@@ -345,7 +345,7 @@ open class Yarn(
345345
}
346346

347347
internal fun getRemotePackageDetails(packageName: String): PackageJson? {
348-
yarnInfoCache.read(packageName)?.let { return parsePackageJson(it) }
348+
yarnInfoCache.read(packageName)?.also { return parsePackageJson(it) }
349349

350350
val process = YarnCommand.run("info", "--json", packageName).requireSuccess()
351351

0 commit comments

Comments
 (0)