| 2398 | } |
| 2399 | |
| 2400 | static void cbm_opencode_config_path(const char *home_dir, char *out, size_t out_sz) { |
| 2401 | char env_buf[CLI_BUF_1K]; |
| 2402 | const char *custom = cbm_safe_getenv("OPENCODE_CONFIG", env_buf, sizeof(env_buf), NULL); |
| 2403 | if (custom && custom[0]) { |
| 2404 | snprintf(out, out_sz, "%s", custom); |
| 2405 | return; |
| 2406 | } |
| 2407 | snprintf(out, out_sz, "%s/.config/opencode/opencode.json", home_dir); |
| 2408 | } |
| 2409 | |
| 2410 | static void cbm_copilot_config_dir(const char *home_dir, char *out, size_t out_sz) { |
| 2411 | char env_buf[CLI_BUF_1K]; |
no test coverage detected