/{website,internal,docs,cmd}: integration tests and more split backend fixes
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
|
||||
"github.com/steveyegge/beads/internal/config"
|
||||
"github.com/steveyegge/beads/internal/rpc"
|
||||
"github.com/steveyegge/beads/internal/storage/sqlite"
|
||||
"github.com/steveyegge/beads/internal/types"
|
||||
"github.com/steveyegge/beads/internal/ui"
|
||||
"github.com/steveyegge/beads/internal/validation"
|
||||
@@ -86,13 +87,17 @@ func finalizeExport(ctx context.Context, result *ExportResult) {
|
||||
}
|
||||
|
||||
// Update database mtime to be >= JSONL mtime (fixes #278, #301, #321)
|
||||
// This prevents validatePreExport from incorrectly blocking on next export
|
||||
// This prevents validatePreExport from incorrectly blocking on next export.
|
||||
//
|
||||
// Dolt backend does not use a SQLite DB file, so this check is SQLite-only.
|
||||
if result.JSONLPath != "" {
|
||||
beadsDir := filepath.Dir(result.JSONLPath)
|
||||
dbPath := filepath.Join(beadsDir, "beads.db")
|
||||
if err := TouchDatabaseFile(dbPath, result.JSONLPath); err != nil {
|
||||
// Non-fatal warning
|
||||
fmt.Fprintf(os.Stderr, "Warning: failed to update database mtime: %v\n", err)
|
||||
if _, ok := store.(*sqlite.SQLiteStorage); ok {
|
||||
beadsDir := filepath.Dir(result.JSONLPath)
|
||||
dbPath := filepath.Join(beadsDir, "beads.db")
|
||||
if err := TouchDatabaseFile(dbPath, result.JSONLPath); err != nil {
|
||||
// Non-fatal warning
|
||||
fmt.Fprintf(os.Stderr, "Warning: failed to update database mtime: %v\n", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user