From bfb1491e312752a0c3f6e34781e9211ca0667d2e Mon Sep 17 00:00:00 2001 From: Gareth Williams Date: Tue, 25 Sep 2018 22:53:43 +0200 Subject: [PATCH] Add support for sqlite build tag for config/database.yml --- cmd/run.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/run.go b/cmd/run.go index 5f3f864..9076459 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -49,7 +49,11 @@ func Run(name string, args []string) error { func run(args []string) error { rargs := []string{"run"} // Test for special cases requiring sqlite build tag - if b, err := ioutil.ReadFile("database.yml"); err == nil { + b, err := ioutil.ReadFile("database.yml") + if err != nil { + b, err = ioutil.ReadFile("config/database.yml") + } + if err == nil { if bytes.Contains(b, []byte("sqlite")) { rargs = append(rargs, "-tags", "sqlite") }