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 /src | |
parent | de095d377859887352c7380e52ea89bcabf662a0 (diff) | |
download | byspel-master.tar.gz byspel-master.tar.bz2 byspel-master.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/main/scala/byspel/app/App.scala | 3 |
1 files changed, 2 insertions, 1 deletions
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) |