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

Function cli_update_prep_step

src/cli/cli.c:13239–13251  ·  view source on GitHub ↗

Records the first failing step. An OS-level step keeps the errno it left; a * step that succeeds clears errno so the next one starts clean. Returns ok, so * the steps chain with &&. */

Source from the content-addressed store, hash-verified

13237 * step that succeeds clears errno so the next one starts clean. Returns ok, so
13238 * the steps chain with &&. */
13239static bool cli_update_prep_step(bool ok, const char *step, bool os_level, const char *detail,
13240 cli_update_prep_failure_t *failure) {
13241 if (ok) {
13242 errno = 0;
13243 return true;
13244 }
13245 if (!failure->step) {
13246 failure->step = step;
13247 failure->os_error = os_level ? errno : 0;
13248 failure->detail = detail;
13249 }
13250 return false;
13251}
13252
13253static void cli_update_prep_report(const cli_update_prep_failure_t *failure) {
13254 const char *step = failure->step ? failure->step : "an unrecorded step";

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected