Skip to content

multiple "--set <pref>" options might behave inconsistent if one entry is invalid #845

Description

@juergenRe

Evaluation of preferences settings will behave inconsistent:

  • --set mqtt.enabled 1 --set 0 1 will write nothing at all and show an error hint on the last
  • --set 0 1 --set mqtt.enabled 1 will write the correct setting but show no error
  • --set mqtt.enabled 1 --set mqtt 1 --set mqtt.username abc will write the 2 valid entries but again show no error.

Reason is the way how preferences are updated within the callback onConnected() in the clause if args.set:. Evaluation handles the incoming list of arguments correctly, but does not take in account, that there might be a mix of correct and incorrect entries.

Before preparing a fix, I want to quickly check what is the intended behavior for such cases:
a) shall we discard all changes and just show the faulty entries?
b) shall we accept the correct entries, send them to the radio but also show all of which have failed?

What is your opinion?

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