Skip to content

Commit

Permalink
Merge pull request #28 from bausshf/master
Browse files Browse the repository at this point in the history
File check for db.json
  • Loading branch information
bausshf authored Nov 5, 2017
2 parents 3ef9d6d + e33b38b commit 02f9bf5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion data/mapping/engines/mysql/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@ private class DbConfig
/// Static shared constructor for the module.
shared static this()
{
import std.file : readText;
import std.file : exists, readText;
import vibe.d : deserializeJson;

if (!exists("config/db.json"))
{
return;
}

auto dbConfig = deserializeJson!DbConfig(readText("config/db.json"));

Expand Down

0 comments on commit 02f9bf5

Please sign in to comment.