Commit 59b1b6a
authored
fix(watch): accept -d/--db to point at a graph.db outside cwd (#987)
Every other command that operates on a graph DB (build, stats, query,
fn-impact, impact, etc.) accepts \`-d, --db <path>\`, but \`watch\` did
not — it rejected the flag with \`error: unknown option '--db'\` and
only honored the positional \`[dir]\`. This forced users in monorepo
and multi-repo setups to \`cd\` into the watched directory, defeating
the purpose of having \`--db\` elsewhere.
Add the option to the watch command, plumb it through watchProject
and setupWatcher, and fall back to \`<rootDir>/.codegraph/graph.db\`
when \`--db\` is absent.
Closes #9841 parent 937e734 commit 59b1b6a
2 files changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
169 | | - | |
| 168 | + | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| |||
0 commit comments