The .env of the directory of `rel` under the repository, NULL when none. */
| 1653 | |
| 1654 | /* The .env of the directory of `rel` under the repository, NULL when none. */ |
| 1655 | static 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) |
no test coverage detected