MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cbm_grok_config_dir

Function cbm_grok_config_dir

src/cli/cli.c:3015–3022  ·  view source on GitHub ↗

Resolve Grok Build's user configuration directory. * Honors $GROK_HOME; falls back to "$home_dir/.grok". */

Source from the content-addressed store, hash-verified

3013/* Resolve Grok Build's user configuration directory.
3014 * Honors $GROK_HOME; falls back to "$home_dir/.grok". */
3015static void cbm_grok_config_dir(const char *home_dir, char *out, size_t out_sz) {
3016 char env_buf[CLI_BUF_1K];
3017 const char *custom = cbm_safe_getenv("GROK_HOME", env_buf, sizeof(env_buf), NULL);
3018 snprintf(out, out_sz, "%s", custom && custom[0] ? custom : "");
3019 if ((!custom || !custom[0]) && home_dir && home_dir[0]) {
3020 snprintf(out, out_sz, "%s/.grok", home_dir);
3021 }
3022}
3023
3024static bool cbm_hook_script_name_safe(const char *script_name) {
3025 if (!script_name || !script_name[0]) {

Callers 3

cbm_detect_agentsFunction · 0.85

Calls 1

cbm_safe_getenvFunction · 0.85

Tested by

no test coverage detected