Skip to content

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

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.

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions