Skip to content

Commit

Permalink
chore(node): Prefer Kotlin's in operator over contains()
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Jun 6, 2024
1 parent a011e05 commit 44b738d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/package-managers/node/src/main/kotlin/Yarn2.kt
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class Yarn2(
*/
private fun isCorepackEnabledInManifest(workingDir: File): Boolean =
runCatching {
jsonMapper.readTree(workingDir.resolve(MANIFEST_FILE)).contains(PACKAGE_MANAGER_PROPERTY)
PACKAGE_MANAGER_PROPERTY in jsonMapper.readTree(workingDir.resolve(MANIFEST_FILE))
}.getOrDefault(false)
}

Expand Down

0 comments on commit 44b738d

Please sign in to comment.