Skip to content

Commit c496127

Browse files
committed
refactor(node): Rename a variable
Align the variable name with the name of the corresponding function `isCorepackEnabled`. Signed-off-by: Frank Viernau <[email protected]>
1 parent 6a62490 commit c496127

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugins/package-managers/node/src/main/kotlin/yarn2/Yarn2Command.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import org.semver4j.RangesListFactory
4040
*/
4141
private const val YARN2_RESOURCE_FILE = ".yarnrc.yml"
4242

43-
internal class Yarn2Command(private val enableCorepack: Boolean?) : CommandLineTool {
43+
internal class Yarn2Command(private val corepackEnabled: Boolean?) : CommandLineTool {
4444
@Suppress("Unused") // The no-arg constructor is required by the requirements command.
4545
constructor() : this(null)
4646

@@ -70,7 +70,8 @@ internal class Yarn2Command(private val enableCorepack: Boolean?) : CommandLineT
7070

7171
override fun getVersionRequirement(): RangesList = RangesListFactory.create(">=2.0.0")
7272

73-
private fun isCorepackEnabled(workingDir: File): Boolean = enableCorepack ?: isCorepackEnabledInManifest(workingDir)
73+
private fun isCorepackEnabled(workingDir: File): Boolean =
74+
corepackEnabled ?: isCorepackEnabledInManifest(workingDir)
7475

7576
private fun getYarnExecutable(workingDir: File): File {
7677
val yarnrcFile = workingDir.resolve(YARN2_RESOURCE_FILE)

0 commit comments

Comments
 (0)