Skip to content

cmd: subscribe silently ignores malformed --filter values #3941

Description

@Elvand-Lie

Problem

func subscribe --filter expects filters in key=value form, but malformed values are currently printed and ignored instead of returning an error.

For example:

func subscribe --filter badfilter

prints Invalid pair: badfilter, continues, and can still write subscription config without the intended filter.

Expected behavior

Malformed filters should fail before func.yaml is changed. Valid values containing = should still be preserved, for example --filter foo=bar=baz should store key foo with value bar=baz.

Suggested fix

Return an error for missing = or an empty key, and add regression tests for malformed filters and values containing =.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions