fix: propagate flags_def through build_index #6

Closed
opened 2026-05-24 08:26:34 +02:00 by michael · 0 comments
Owner

Problem

flags from contribution.json subcommands are not propagated through
build_index() and are therefore unavailable for CLI rendering.

Fix

In build_index, carry flags_def = sub_def.flags alongside args_def:

table.insert(subs, {
  ...
  args_def  = sub_def.args,
  flags_def = sub_def.flags,  -- add
  ...
})

subcommands[s.name] = {
  ...
  args_def  = s.args_def,
  flags_def = s.flags_def,    -- add
  ...
}

Refs

DAW/daw-berhtjan-cli#3 (rendering)

## Problem `flags` from contribution.json subcommands are not propagated through `build_index()` and are therefore unavailable for CLI rendering. ## Fix In `build_index`, carry `flags_def = sub_def.flags` alongside `args_def`: ```lua table.insert(subs, { ... args_def = sub_def.args, flags_def = sub_def.flags, -- add ... }) subcommands[s.name] = { ... args_def = s.args_def, flags_def = s.flags_def, -- add ... } ``` ## Refs DAW/daw-berhtjan-cli#3 (rendering)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/daw-modul-berhtjan-core#6
No description provided.