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

Function dk_read_dotenv

src/pipeline/pass_docker.c:1655–1665  ·  view source on GitHub ↗

The .env of the directory of `rel` under the repository, NULL when none. */

Source from the content-addressed store, hash-verified

1653
1654/* The .env of the directory of `rel` under the repository, NULL when none. */
1655static char *dk_read_dotenv(const cbm_pipeline_ctx_t *ctx, const char *rel) {
1656 if (!ctx->repo_path) {
1657 return NULL;
1658 }
1659 const char *slash = strrchr(rel, '/');
1660 char path[CBM_SZ_4K];
1661 snprintf(path, sizeof(path), "%s/%.*s%s.env", ctx->repo_path, slash ? (int)(slash - rel) : 0,
1662 rel, slash ? "/" : "");
1663 size_t len = 0;
1664 return dk_read(path, &len);
1665}
1666
1667/* Every build configuration of the repository -- read from disk through the
1668 * File nodes, so an incremental run (which recomputes these edges whole)

Callers 1

dk_link_buildsFunction · 0.85

Calls 1

dk_readFunction · 0.85

Tested by

no test coverage detected