Skip to content

Support setting boolean properties with -c.extraMetadata #1674

@jviotti

Description

@jviotti
  • Version: 18.6.2
  • Target: debian

I need to set a boolean value using --extraMetadata, however it seems that this option only supports strings, therefore something like:

--extraMetadata.updates.enabled=false

Results in:

{
    "updates": {
        "enabled": "false"
    }
}

I haven't tested it, but I suspect the same issue applies to numbers.

Of course I can workaround this limitation from my application code, however I wonder if we could add support for values other than strings.

Some thoughts:

  • We could check if the value equals false, true, or contains only numbers and coerce appropriately, however there might be cases where you really need to set something like "false"
  • Maybe there can be --extraMetadataBoolean and --extraMetadataNumber options?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions