Skip to content

config set cannot set an array, so an exec sink is unconfigurable from the CLI #24

Closed

Description

@Microck

Found while live-verifying the watch service for #5.

wallapop config set cannot write a TOML array, so sinks.<name>.command cannot be set at all:

$ wallapop config set sinks.script.command '["/home/me/bin/on-event"]'
cannot decode TOML string into []string

An exec sink is documented in docs/cli-spec.md and works once the value is there, but the only way to get it there is to hand-edit config.toml. That is the config command failing at one of the three sink types it is supposed to configure.

Acceptance criteria

  • config set accepts an array value for keys whose type is a slice, in whatever syntax reads naturally on a shell line
  • sink test script works end to end on a sink created only with config set
  • config get round-trips the value it just wrote
  • A wrong-typed value is a usage error (exit 2) naming the expected type, not a decode error

Where

internal/cli/misc.go, the config set decode path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions