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

Function restore_env

tests/test_runtime_settings.c:34–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32 return cbm_setenv("CBM_CACHE_DIR", fixture->path, 1) == 0;
33}
34static void restore_env(const char *key, char *value) {
35 if (value)
36 cbm_setenv(key, value, 1);
37 else
38 cbm_unsetenv(key);
39 free(value);
40}
41static void fixture_close(settings_fixture_t *fixture) {
42 cbm_runtime_settings_reset_for_tests();
43 restore_env("CBM_CACHE_DIR", fixture->cache);

Callers 2

fixture_closeFunction · 0.85

Calls 2

cbm_setenvFunction · 0.85
cbm_unsetenvFunction · 0.85

Tested by

no test coverage detected