Peter Chanthamynavong
b7d650bd8e
fix(init): respect BEADS_DIR environment variable ( #1273 )
...
* fix(sync): read sync.mode from yaml first, then database
bd config set sync.mode writes to config.yaml (because sync.* is a
yaml-only prefix), but GetSyncMode() only read from the database.
This caused dolt-native mode to be ignored - JSONL export still
happened because the database had no sync.mode value.
Now GetSyncMode() checks config.yaml first (via config.GetSyncMode()),
falling back to database for backward compatibility.
Fixes: oss-5ca279
* fix(init): respect BEADS_DIR environment variable
Problem:
- `bd init` ignored BEADS_DIR when checking for existing data
- `bd init` created database at CWD/.beads instead of BEADS_DIR
- Contributor wizard used ~/.beads-planning as default, ignoring BEADS_DIR
Solution:
- Add BEADS_DIR check in checkExistingBeadsData() (matches FindBeadsDir pattern)
- Compute beadsDirForInit early, before initDBPath determination
- Use BEADS_DIR as default in contributor wizard when set
- Preserve precedence: --db > BEADS_DB > BEADS_DIR > default
Impact:
- Users with BEADS_DIR set now get consistent behavior across all bd commands
- ACF-style fork tracking (external .beads directory) now works correctly
Fixes: steveyegge/beads#???
* fix(doctor): respect BEADS_DIR environment variable
Also updates documentation to reflect BEADS_DIR support in init and doctor.
Changes:
- doctor.go: Check BEADS_DIR before falling back to CWD
- doctor_test.go: Add tests for BEADS_DIR path resolution
- WORKTREES.md: Document simplified BEADS_DIR+init workflow
- CONTRIBUTOR_NAMESPACE_ISOLATION.md: Note init/doctor BEADS_DIR support
* test(init): add BEADS_DB > BEADS_DIR precedence test
Verifies that BEADS_DB env var takes precedence over BEADS_DIR
when both are set, ensuring the documented precedence order:
--db > BEADS_DB > BEADS_DIR > default
* chore: fill in GH#1277 placeholder in sync_mode comment
2026-01-24 17:10:05 -08:00
..
2026-01-23 20:35:57 -08:00
2026-01-21 21:50:01 -08:00
2026-01-21 23:42:07 -08:00
2026-01-20 20:50:59 -08:00
2026-01-20 20:50:59 -08:00
2026-01-10 12:43:46 -08:00
2026-01-17 01:54:50 -08:00
2026-01-20 20:50:59 -08:00
2026-01-03 13:25:15 -08:00
2026-01-06 22:18:37 -08:00
2026-01-13 20:58:07 -08:00
2026-01-06 19:05:34 -08:00
2026-01-12 16:39:06 -08:00
2026-01-22 20:52:20 -08:00
2026-01-06 12:52:19 -08:00
2026-01-15 19:23:07 -08:00
2026-01-17 01:55:16 -08:00
2026-01-20 20:50:59 -08:00
2026-01-21 10:36:59 -08:00
2026-01-22 15:54:04 -08:00
2026-01-17 03:48:51 -08:00
2026-01-13 13:28:30 +00:00
2026-01-17 01:54:50 -08:00
2026-01-15 19:22:55 -08:00
2026-01-06 19:37:20 -08:00
2026-01-17 14:02:28 -08:00
2026-01-19 11:42:09 -08:00
2026-01-01 10:46:56 -08:00
2026-01-01 10:46:56 -08:00
2026-01-14 20:50:56 -08:00
2026-01-02 14:01:56 -08:00
2026-01-21 10:36:59 -08:00
2026-01-16 15:44:33 -08:00
2026-01-01 10:53:59 -08:00
2026-01-21 21:22:04 -08:00
2026-01-01 20:06:13 -08:00
2026-01-21 21:22:04 -08:00
2026-01-21 13:13:24 -08:00
2025-12-31 13:14:15 -08:00
2026-01-01 10:48:14 -08:00
2026-01-21 16:59:51 -08:00
2026-01-23 20:20:59 -08:00
2026-01-12 23:51:56 -08:00
2026-01-10 22:50:16 -08:00
2026-01-19 10:08:53 -08:00
2026-01-23 20:20:59 -08:00
2026-01-20 20:55:27 -08:00
2026-01-04 10:53:31 -08:00
2026-01-10 22:50:16 -08:00
2026-01-21 18:06:06 -08:00
2026-01-10 16:31:16 -08:00
2026-01-07 21:27:20 -08:00
2026-01-19 10:21:12 -08:00
2026-01-19 10:08:41 -08:00
2026-01-24 17:10:02 -08:00
2026-01-04 11:14:36 -08:00
2026-01-22 00:01:37 -08:00
2026-01-23 20:20:59 -08:00
2026-01-06 18:59:25 -08:00
2026-01-10 12:43:46 -08:00
2026-01-08 14:32:12 -08:00
2026-01-10 12:08:48 -08:00
2026-01-17 01:55:16 -08:00
2026-01-20 16:51:14 -08:00
2026-01-24 00:26:58 -08:00
2026-01-20 23:15:37 -08:00
2026-01-23 20:38:20 -08:00
2026-01-24 17:10:05 -08:00
2026-01-24 17:10:05 -08:00
2026-01-22 20:52:20 -08:00
2026-01-22 20:52:20 -08:00
2026-01-22 20:52:20 -08:00
2026-01-22 20:52:20 -08:00
2026-01-20 17:34:00 -08:00
2026-01-20 17:34:00 -08:00
2026-01-21 13:13:24 -08:00
2026-01-22 00:01:37 -08:00
2026-01-22 00:01:37 -08:00
2026-01-21 18:06:06 -08:00
2026-01-06 12:52:19 -08:00
2026-01-06 19:05:34 -08:00
2026-01-17 03:44:13 -08:00
2026-01-17 03:44:13 -08:00
2026-01-09 22:53:53 -08:00
2025-12-31 13:14:15 -08:00
2025-12-31 13:14:15 -08:00
2025-12-31 11:39:17 -08:00
2026-01-21 10:36:59 -08:00
2026-01-21 13:13:24 -08:00
2026-01-22 00:01:37 -08:00
2026-01-22 00:01:37 -08:00
2026-01-21 19:34:29 -08:00
2026-01-01 10:51:22 -08:00
2026-01-01 11:05:05 -08:00
2026-01-21 10:36:59 -08:00
2026-01-06 23:40:37 -08:00
2026-01-21 10:36:59 -08:00
2025-12-31 13:14:15 -08:00
2026-01-08 20:50:56 -08:00
2026-01-17 01:55:16 -08:00
2026-01-19 11:44:08 -08:00
2026-01-22 20:52:20 -08:00
2026-01-17 08:44:30 +01:00
2026-01-20 19:15:18 -08:00
2026-01-03 13:27:36 -08:00
2026-01-22 20:52:20 -08:00
2026-01-21 23:42:07 -08:00
2026-01-24 17:10:05 -08:00
2026-01-20 19:13:02 -08:00
2026-01-12 17:29:57 -08:00
2026-01-17 02:29:01 -08:00
2026-01-17 02:29:01 -08:00
2026-01-15 07:55:08 -08:00
2026-01-15 11:37:57 -08:00
2026-01-24 17:10:05 -08:00
2026-01-24 17:10:05 -08:00
2026-01-01 10:51:51 -08:00
2026-01-24 17:10:02 -08:00
2026-01-06 19:05:34 -08:00
2026-01-20 14:05:48 -08:00
2026-01-20 14:05:48 -08:00
2026-01-20 14:05:48 -08:00
2026-01-01 14:18:49 -08:00
2026-01-08 20:50:56 -08:00
2026-01-21 19:11:25 -08:00
2026-01-24 17:09:45 -08:00
2026-01-20 16:51:14 -08:00
2026-01-01 23:55:40 -08:00
2026-01-20 14:05:40 -08:00
2026-01-23 22:35:34 -08:00
2026-01-17 03:44:02 -08:00
2026-01-15 07:55:08 -08:00
2026-01-21 17:46:15 -08:00
2026-01-21 19:27:01 -08:00
2026-01-15 07:55:08 -08:00
2026-01-19 10:21:12 -08:00
2026-01-21 17:46:15 -08:00
2025-12-31 00:33:11 -08:00
2026-01-10 11:55:33 -08:00
2026-01-21 19:30:15 -08:00
2025-12-31 13:04:19 -08:00
2026-01-21 10:36:59 -08:00
2026-01-21 19:30:15 -08:00
2026-01-20 14:06:57 -08:00
2026-01-02 14:08:22 -08:00
2026-01-21 19:30:15 -08:00
2026-01-02 01:31:19 -08:00
2026-01-06 19:05:34 -08:00
2026-01-04 16:24:18 -08:00
2026-01-04 16:24:18 -08:00
2026-01-21 19:52:31 -08:00
2026-01-21 21:11:33 -08:00
2026-01-21 19:30:15 -08:00
2025-12-31 00:05:53 -08:00
2026-01-01 10:51:51 -08:00
2026-01-07 20:45:40 -08:00
2026-01-24 17:09:51 -08:00
2026-01-16 15:44:33 -08:00
2026-01-07 20:44:16 -08:00
2026-01-01 20:06:13 -08:00
2026-01-08 21:22:17 -08:00
2026-01-06 19:05:34 -08:00
2026-01-15 19:23:07 -08:00
2026-01-06 19:05:34 -08:00
2026-01-04 10:53:31 -08:00
2026-01-04 10:53:31 -08:00
2026-01-06 19:32:20 -08:00
2026-01-20 18:49:44 -08:00
2025-12-31 13:14:15 -08:00
2026-01-06 18:59:25 -08:00
2026-01-21 19:50:03 -08:00
2026-01-21 21:50:38 -08:00
2026-01-07 21:41:29 -08:00
2026-01-08 20:21:02 -08:00
2026-01-24 00:26:58 -08:00
2025-12-31 13:14:15 -08:00
2026-01-21 21:50:01 -08:00
2026-01-23 21:14:59 -08:00
2026-01-21 10:36:59 -08:00
2026-01-24 17:09:48 -08:00
2026-01-04 15:21:36 -08:00
2026-01-03 13:27:36 -08:00
2026-01-09 13:40:52 -08:00
2026-01-18 18:25:50 -08:00
2026-01-15 19:23:07 -08:00
2026-01-21 10:36:59 -08:00
2026-01-19 10:21:12 -08:00
2026-01-15 19:23:07 -08:00
2026-01-15 07:55:08 -08:00
2026-01-20 21:26:17 -08:00
2026-01-24 17:10:02 -08:00
2026-01-07 21:27:20 -08:00
2026-01-15 19:22:52 -08:00
2026-01-15 19:22:52 -08:00
2026-01-15 07:55:08 -08:00
2026-01-22 20:52:20 -08:00
2026-01-06 12:52:19 -08:00
2026-01-21 19:40:39 -08:00
2026-01-21 19:40:39 -08:00
2026-01-21 19:40:39 -08:00
2026-01-21 19:40:39 -08:00
2026-01-18 10:36:20 -08:00
2026-01-24 17:10:05 -08:00
2026-01-19 10:11:06 -08:00
2026-01-07 21:27:20 -08:00
2026-01-02 00:05:12 -08:00
2026-01-22 20:52:20 -08:00
2026-01-03 12:44:16 -08:00
2026-01-17 05:07:11 -08:00
2026-01-14 20:43:07 -08:00
2026-01-15 07:55:08 -08:00
2026-01-21 10:36:59 -08:00
2026-01-22 20:52:20 -08:00
2026-01-21 10:36:59 -08:00
2026-01-06 18:59:25 -08:00
2026-01-22 15:54:04 -08:00
2026-01-22 20:52:20 -08:00
2026-01-02 01:07:34 -08:00
2026-01-21 23:42:07 -08:00
2026-01-10 13:34:53 -08:00
2026-01-21 19:30:15 -08:00
2026-01-15 07:55:08 -08:00
2026-01-20 14:04:51 -08:00
2026-01-10 22:38:04 -08:00
2026-01-15 07:55:08 -08:00