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

Function dk_run

src/pipeline/pass_docker.c:1034–1060  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1032}
1033
1034static void dk_run(dk_t *d, TSNode ins) {
1035 if (d->stage >= DK_MAX_STAGES) {
1036 return;
1037 }
1038 for (uint32_t i = 0; i < ts_node_named_child_count(ins); i++) {
1039 TSNode sc = ts_node_named_child(ins, i);
1040 if (!dk_type(sc, "shell_command")) {
1041 continue;
1042 }
1043 /* command lists split at && || ; (as written, quotes or not) */
1044 const char *p = d->src + ts_node_start_byte(sc);
1045 const char *end = d->src + ts_node_end_byte(sc);
1046 while (p < end) {
1047 const char *q = p;
1048 while (q < end &&
1049 !(q + SKIP_ONE < end && ((q[0] == '&' && q[SKIP_ONE] == '&') ||
1050 (q[0] == '|' && q[SKIP_ONE] == '|'))) &&
1051 *q != ';') {
1052 q++;
1053 }
1054 const char *w[DK_MAX_WORDS];
1055 int n = dk_words(d, p, q, w, DK_MAX_WORDS);
1056 dk_go_builds(d, w, n);
1057 p = q < end ? q + (*q == ';' ? SKIP_ONE : PAIR_LEN) : end;
1058 }
1059 }
1060}
1061
1062static void dk_workdir(dk_t *d, TSNode ins) {
1063 for (uint32_t i = 0; i < ts_node_named_child_count(ins); i++) {

Callers 1

dk_fileFunction · 0.85

Calls 3

dk_typeFunction · 0.85
dk_wordsFunction · 0.85
dk_go_buildsFunction · 0.85

Tested by

no test coverage detected