From bd913d2e0bb95759a604879e9a0217d6b507662c Mon Sep 17 00:00:00 2001 From: Jakob Odersky Date: Sat, 27 Oct 2018 19:23:17 -0700 Subject: Downgrade JDK requirement from 11 to 8 --- debian/control | 2 +- src/main/scala/byspel/app/App.scala | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 9025234..711060e 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Homepage: https://github.com/jodersky/byspel Package: byspel Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, openjdk-11-jdk-headless, libdbd-sqlite3-perl, sqitch, sqlite3 +Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, java8-sdk-headless, libdbd-sqlite3-perl, sqitch, sqlite3 Recommends: nginx Description: Example Scala application This application demonstrates how Akka HTTP and Slick can be used to create diff --git a/src/main/scala/byspel/app/App.scala b/src/main/scala/byspel/app/App.scala index 65b3c3f..15a216f 100644 --- a/src/main/scala/byspel/app/App.scala +++ b/src/main/scala/byspel/app/App.scala @@ -30,7 +30,8 @@ trait App { case head :: _ if Files.isReadable(Paths.get(head)) => log(s"loading config from '${args(0)}'") import toml.Codecs._ - Toml.parseAs[Config](Files.readString(Paths.get(head))) match { + val str = new String(Files.readAllBytes(Paths.get(head)), "utf-8") + Toml.parseAs[Config](str) match { case Left(err) => log(s"fatal: syntax error in config file: $err") sys.exit(1) -- cgit v1.2.3