add check for unset XBIT_DB
This commit is contained in:
parent
c4a1f07ee2
commit
7e49f06d8e
4
main.go
4
main.go
|
@ -112,6 +112,10 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
dbpath := os.Getenv("XBIT_DB")
|
dbpath := os.Getenv("XBIT_DB")
|
||||||
|
if dbpath == "" {
|
||||||
|
log.Fatal("XBIT_DB not set")
|
||||||
|
}
|
||||||
|
|
||||||
var db TimelineDB
|
var db TimelineDB
|
||||||
var err error
|
var err error
|
||||||
db.DB, err = sql.Open("sqlite3", dbpath)
|
db.DB, err = sql.Open("sqlite3", dbpath)
|
||||||
|
|
Loading…
Reference in New Issue