Commit c1fc225
committed
fix: Save SerenDB target state from init for use by sync command
Previously, when using interactive SerenDB target selection with init,
the captured TargetState (containing project_id, branch_id, etc.) was
never persisted to disk. This forced users to manually find their
project_id and pass it via --project-id when running sync.
This commit fixes two issues:
1. init now saves TargetState to .seren-replicator/target.json after
interactive selection
2. sync now loads project_id from saved state if not provided via CLI
The infrastructure for this already existed in serendb/target.rs - it
just was not being called.1 parent 2082f5c commit c1fc225
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| 278 | + | |
| 279 | + | |
278 | 280 | | |
279 | 281 | | |
280 | 282 | | |
| |||
460 | 462 | | |
461 | 463 | | |
462 | 464 | | |
463 | | - | |
464 | | - | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
465 | 475 | | |
466 | 476 | | |
467 | 477 | | |
| |||
0 commit comments