multica-ai/multica · warning
--value is required
Error message
--value is required
What it means
Thrown by `multica issue metadata set` when the --value flag was never passed on the command line. The code uses cmd.Flags().Changed("value") rather than comparing the string, so an explicitly empty `--value ""` IS accepted — the error only fires when the flag is absent entirely.
Source
Thrown at server/cmd/multica/cmd_issue_metadata.go:257
}
output, _ := cmd.Flags().GetString("output")
if output == "json" {
return cli.PrintJSON(os.Stdout, value)
}
headers := []string{"KEY", "VALUE", "TYPE"}
rows := [][]string{{key, formatMetadataValue(value), metadataValueType(value)}}
cli.PrintTable(os.Stdout, headers, rows)
return nil
}
func runIssueMetadataSet(cmd *cobra.Command, args []string) error {
key, _ := cmd.Flags().GetString("key")
if key == "" {
return fmt.Errorf("--key is required")
}
if !cmd.Flags().Changed("value") {
return fmt.Errorf("--value is required")
}
rawValue, _ := cmd.Flags().GetString("value")
forcedType, _ := cmd.Flags().GetString("type")
value, err := parseMetadataValue(rawValue, forcedType)
if err != nil {
return err
}
client, err := newAPIClient(cmd)
if err != nil {
return err
}
ctx, cancel := cli.APIContext(context.Background())
defer cancel()
issueRef, err := resolveIssueRef(ctx, client, args[0])
if err != nil {
return fmt.Errorf("resolve issue: %w", err)View on GitHub (pinned to 2c0912b6ec)
Solutions
- Always pass --value, even when storing an empty string: `--value ""` is valid and distinct from omitting the flag
- In scripts, verify the flag presence (`[[ $# --value present ]]`) before calling the command
Example fix
# before multica issue metadata set MUL-1 --key priority # after (set to empty string explicitly) multica issue metadata set MUL-1 --key priority --value ""
Defensive patterns
Strategy: validation
Validate before calling
# distinguish 'flag absent' from 'empty value' in wrappers if ! grep -q -- '--value' <<< "$*"; then echo "--value is required" >&2; exit 2; fi
Prevention
- Remember Changed("value") semantics: --value "" is legal, omitting the flag is not
- Build command lines with explicit flag arrays so --value is always present
When it happens
Trigger: Running the command with --key but no --value at all. Note `--value ""` (explicitly empty) passes this check; omitting the flag does not.
Common situations: Scripts building flags conditionally where the value branch is skipped, users expecting the CLI to prompt for a missing value, or a copied command line with the value truncated.
Related errors
- --kind must be schedule or webhook
- --cron is required for --kind schedule
- --timezone is only valid with --kind schedule
- --cron is only valid with --kind schedule
- no fields to update; use --enabled, --cron, --timezone, or -
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/9da0b288c84d7e4d.
Report an issue: GitHub.