Skip to content

fix: support string values for field add boolean --default-value #161

@angeloashmore

Description

@angeloashmore

Description

prismic field add boolean accepts a --default-value flag typed as boolean in Node's parseArgs. Boolean flags in parseArgs cannot be given an explicit value, so --default-value=true and --default-value=false both error out. The only way to set the default is to pass --default-value (true) or omit it (undefined), with no way to explicitly set false.

Change --default-value to a string flag that accepts "true" or "false", then parse it to a boolean before writing the model.

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