diff options
author | Jakob Odersky <jakob@odersky.com> | 2018-10-27 19:23:17 -0700 |
---|---|---|
committer | Jakob Odersky <jakob@odersky.com> | 2018-10-27 19:23:17 -0700 |
commit | bd913d2e0bb95759a604879e9a0217d6b507662c (patch) | |
tree | c9f23e390f97fe1444ddbe0bb767df42cdc4a1f9 | |
parent | de095d377859887352c7380e52ea89bcabf662a0 (diff) | |
download | byspel-bd913d2e0bb95759a604879e9a0217d6b507662c.tar.gz byspel-bd913d2e0bb95759a604879e9a0217d6b507662c.tar.bz2 byspel-bd913d2e0bb95759a604879e9a0217d6b507662c.zip |
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | 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) |