Skip to content

Commit

Permalink
Add support for sqlite build tag for config/database.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
g4z authored and markbates committed Sep 26, 2018
1 parent 1c75bde commit bfb1491
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit bfb1491

Please sign in to comment.