Skip to content

Commit fac7091

Browse files
committed
restore concurrency
1 parent 1ee481b commit fac7091

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/scala/MakeDownloadPage.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ class MakeDownloadPage(version: String, releaseDate: Date = new Date()):
1515
println("# to prepare your scala-lang PR")
1616

1717
// get size of `url` without actually downloading it
18-
def humanSize(url: String): Future[String] =
18+
def humanSize(url: String): Future[String] = Future:
1919
import scala.sys.process.*
2020
println("## fetching size of "+ url)
2121
val out = ListBuffer.empty[String]
2222
val err = StringBuilder()
23-
val r = scala.util.Try {
23+
scala.util.Try {
2424
val logger = ProcessLogger(out += _, e => err.append(e + "\n"))
2525
Process(s"curl -L -m 5 --silent -D - -X HEAD $url").!(logger)
2626
val responseHeader = out.toList
@@ -38,7 +38,6 @@ class MakeDownloadPage(version: String, releaseDate: Date = new Date()):
3838
println(s"## warning: could not fetch $url")
3939
println(err.toString)
4040
""
41-
Future(r)
4241

4342
def isGoodStatus(status: String): Boolean =
4443
Seq("200", "302").exists(status.contains)

0 commit comments

Comments
 (0)