Commit e299f96
committed
fix(config): derive global-config lock path from GLOBAL_CONFIG_DIR
_with_global_config_lock() mkdir'd GLOBAL_CONFIG_DIR but opened the lock via the
import-time GLOBAL_CONFIG_LOCK_PATH constant, so the two diverged whenever
GLOBAL_CONFIG_DIR was redirected. Tests monkeypatch GLOBAL_CONFIG_DIR to a tmp
dir but not the lock constant, so the lock opened the real ~/.config/openkb/
global.lock — present on a dev machine, absent on a fresh CI runner — making the
/api/v1/init tests crash with FileNotFoundError (500) only in CI. Derive the
lock path from GLOBAL_CONFIG_DIR at call time so it co-locates with the dir
just created.1 parent 2c98df9 commit e299f96
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
50 | 56 | | |
51 | 57 | | |
52 | 58 | | |
| |||
0 commit comments