Skip to content

Commit

Permalink
feat(cocoapods): Add custom error message
Browse files Browse the repository at this point in the history
Add a custom error message for the case that a build target cannot
be found in the resolved versions from the lockfile.
Give context information what resolved versions were found.

This improves the current situation where just an
IllegalStateException is thrown without any further context.

Signed-off-by: Wolfgang Klenk <[email protected]>
  • Loading branch information
wkl3nk authored and sschuberth committed Dec 20, 2024
1 parent 8b3ff75 commit f0dd53a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,10 @@ private fun parseLockfile(podfileLock: File): LockfileData {
// The version written to the lockfile matches the version specified in the project's ".podspec" file at the
// given revision, so the same version might be used in different revisions. To still get a unique identifier,
// append the revision to the version.
val versionFromPodspec = checkNotNull(resolvedVersions[name])
val versionFromPodspec = checkNotNull(resolvedVersions[name]) {
"Could not find the resolved version for '$name' in the podspec file."
}

val uniqueVersion = "$versionFromPodspec-$revision"
val id = Identifier("Pod", "", name, uniqueVersion)

Expand Down

0 comments on commit f0dd53a

Please sign in to comment.