diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b241f0..0d55199 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## [Unreleased] ### Fixed - an issue affecting some old terminals in which the escape sequences used for displaying progress bars were incorrectly printed to the console (#8) +- an issue that could cause warning messages to mess up the prompt display (#5) ### Changed - improved error message if channel-build fails randomly in case old files could not be removed (#6) diff --git a/src/main/scala/sc4pac/Find.scala b/src/main/scala/sc4pac/Find.scala index 90c28f5..10dfa46 100644 --- a/src/main/scala/sc4pac/Find.scala +++ b/src/main/scala/sc4pac/Find.scala @@ -30,7 +30,9 @@ object Find { def packageData[A <: JD.Package | JD.Asset : Reader](module: C.Module, version: String): RIO[ResolutionContext, Option[A]] = { def tryAllRepos(repos: Seq[MetadataRepository], context: ResolutionContext): Task[Option[A]] = ZIO.collectFirst(repos) { repo => val task: Task[Option[A]] = { - repo.fetchModuleJson[A](module, version, context.cache.fetchText).map(Some(_)) + repo.fetchModuleJson[A](module, version, context.cache.fetchText) + .uninterruptible // uninterruptile to avoid incomplete-download error messages when resolving is interrupted to prompt for a variant selection (downloading json should be fairly quick anyway) + .map(Some(_)) .catchSome { case _: error.Sc4pacVersionNotFound => ZIO.succeed(None) // repositories not containing module:version can be ignored case e: (ArtifactError.WrongChecksum | ArtifactError.ChecksumFormatError | ArtifactError.ChecksumNotFound) =>