Commit 6f8bd81
Test
fix(mcpb): fix config loading logic to always read config file
Critical bug fix: The condition 'if config_path is not None or (not use_env)'
prevented loading the config file when config_path=None and use_env=True.
This broke the hybrid configuration pattern where:
- Server URL comes from environment variable (static, doesn't change)
- Tokens come from config file (dynamic, can be auto-updated on refresh)
Fix: Always attempt to load config file (using DEFAULT_CONFIG_PATH if not
specified), making it optional only when use_env=True and file doesn't exist.
Environment variables still override file values when use_env=True.
This enables Claude Desktop to use:
env: CIDX_SERVER_URL=https://...
file: bearer_token + refresh_token (auto-updated on token refresh)1 parent d824881 commit 6f8bd81
1 file changed
+11
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
112 | 114 | | |
113 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
114 | 118 | | |
115 | 119 | | |
116 | 120 | | |
| |||
0 commit comments