refactor: remove AX_DB_PATH env var, fix Dockerfile for src/ layout
This commit is contained in:
@@ -59,14 +59,9 @@ func InitSQLiteStore(path string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// FindAndOpenSQLiteStore opens the SQLite database. If the AX_DB_PATH environment
|
||||
// variable is set, it uses that path directly. Otherwise, it walks up from the
|
||||
// FindAndOpenSQLiteStore opens the SQLite database by walking up from the
|
||||
// current working directory to find an .ax/ax.db file.
|
||||
func FindAndOpenSQLiteStore() (GraphStore, error) {
|
||||
if dbpath := os.Getenv("AX_DB_PATH"); dbpath != "" {
|
||||
return NewSQLiteStore(dbpath)
|
||||
}
|
||||
|
||||
dataRoot, err := FindDataRoot(".local", "share")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to find data dir: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user