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

Function sh_t_kust

src/pipeline/pass_shell.c:1257–1269  ·  view source on GitHub ↗

-k DIR / kustomize build DIR: the Kustomization of DIR. */

Source from the content-addressed store, hash-verified

1255
1256/* -k DIR / kustomize build DIR: the Kustomization of DIR. */
1257static int sh_t_kust(sh_t *s, const char *dir, const sh_find_t *f, sh_targets_t *out) {
1258 (void)f;
1259 static const char *const names[] = {"kustomization.yaml", "kustomization.yml", "Kustomization"};
1260 for (size_t i = 0; i < sizeof(names) / sizeof(names[0]); i++) {
1261 const char *p = cbm_arena_sprintf(s->a, "%s%s%s", dir, dir[0] ? "/" : "", names[i]);
1262 const char *key = p ? cbm_ht_get_key(s->ix->kusts, p) : NULL;
1263 if (key) {
1264 sh_targets_push(out, (int64_t)(intptr_t)cbm_ht_get(s->ix->kusts, key), dir);
1265 return SKIP_ONE;
1266 }
1267 }
1268 return 0;
1269}
1270
1271/* A chart directory: its Chart. */
1272static int sh_t_chart(sh_t *s, const char *dir, const sh_find_t *f, sh_targets_t *out) {

Callers

nothing calls this directly

Calls 4

cbm_ht_get_keyFunction · 0.85
sh_targets_pushFunction · 0.85
cbm_ht_getFunction · 0.85
cbm_arena_sprintfFunction · 0.50

Tested by

no test coverage detected