Fix typo in constructor parameter name (#162)

Breaking change: changes param name `noTranstive` to `noTransitive`.
This commit is contained in:
translatenix
2024-02-15 09:35:21 -08:00
committed by GitHub
parent c3473cc626
commit 810a755702
2 changed files with 10 additions and 10 deletions

View File

@@ -24,7 +24,7 @@ import org.pkl.core.packages.PackageUri
class CliDownloadPackageCommand(
baseOptions: CliBaseOptions,
private val packageUris: List<PackageUri>,
private val noTranstive: Boolean
private val noTransitive: Boolean
) : CliCommand(baseOptions) {
override fun doRun() {
@@ -35,7 +35,7 @@ class CliDownloadPackageCommand(
val errors = mutableMapOf<PackageUri, Throwable>()
for (pkg in packageUris) {
try {
packageResolver.downloadPackage(pkg, pkg.checksums, noTranstive)
packageResolver.downloadPackage(pkg, pkg.checksums, noTransitive)
} catch (e: Throwable) {
errors[pkg] = e
}

View File

@@ -50,7 +50,7 @@ class CliDownloadPackageCommandTest {
PackageUri("package://localhost:12110/fruit@1.0.5"),
PackageUri("package://localhost:12110/fruit@1.1.0")
),
noTranstive = true
noTransitive = true
)
cmd.run()
assertThat(tempDir.resolve("package-1/localhost:12110/birds@0.5.0/birds@0.5.0.zip")).exists()
@@ -83,7 +83,7 @@ class CliDownloadPackageCommandTest {
caCertificates = listOf(FileTestUtils.selfSignedCertificate)
),
packageUris = listOf(PackageUri("package://localhost:12110/birds@0.5.0")),
noTranstive = true
noTransitive = true
)
cmd.run()
assertThat(tempDir.resolve(".my-cache/package-1/localhost:12110/birds@0.5.0/birds@0.5.0.zip"))
@@ -107,7 +107,7 @@ class CliDownloadPackageCommandTest {
"package://localhost:12110/birds@0.5.0::sha256:3f19ab9fcee2f44f93a75a09e531db278c6d2cd25206836c8c2c4071cd7d3118"
),
),
noTranstive = true
noTransitive = true
)
cmd.run()
assertThat(tempDir.resolve("package-1/localhost:12110/birds@0.5.0/birds@0.5.0.zip")).exists()
@@ -127,7 +127,7 @@ class CliDownloadPackageCommandTest {
listOf(
PackageUri("package://localhost:12110/birds@0.5.0::sha256:intentionallyBogusChecksum"),
),
noTranstive = true
noTransitive = true
)
assertThatCode { cmd.run() }
.hasMessage(
@@ -148,7 +148,7 @@ class CliDownloadPackageCommandTest {
CliDownloadPackageCommand(
baseOptions = CliBaseOptions(workingDir = tempDir, noCache = true),
packageUris = listOf(PackageUri("package://localhost:12110/birds@0.5.0")),
noTranstive = true
noTransitive = true
)
assertThatCode { cmd.run() }
.hasMessage("Cannot download packages because no cache directory is specified.")
@@ -164,7 +164,7 @@ class CliDownloadPackageCommandTest {
caCertificates = listOf(FileTestUtils.selfSignedCertificate)
),
packageUris = listOf(PackageUri("package://localhost:12110/badChecksum@1.0.0")),
noTranstive = true
noTransitive = true
)
assertThatCode { cmd.run() }
.hasMessageStartingWith(
@@ -186,7 +186,7 @@ class CliDownloadPackageCommandTest {
PackageUri("package://localhost:12110/badChecksum@1.0.0"),
PackageUri("package://bogus.domain/notAPackage@1.0.0")
),
noTranstive = true
noTransitive = true
)
assertThatCode { cmd.run() }
.hasMessage(
@@ -218,7 +218,7 @@ class CliDownloadPackageCommandTest {
caCertificates = listOf(FileTestUtils.selfSignedCertificate)
),
packageUris = listOf(PackageUri("package://localhost:12110/birds@0.5.0")),
noTranstive = false
noTransitive = false
)
.run()
assertThat(tempDir.resolve("package-1/localhost:12110/birds@0.5.0/birds@0.5.0.zip")).exists()