Skip to content

InvertedBoolFlag options in cli are confusing and misleading #790

@joegraviton

Description

@joegraviton

For example:

config.InvertedBoolFlag(fs, &cli.MistTriggerSetup, "mist-trigger-setup", true, "Overwrite Mist triggers with the ones built into catalyst-api")

This means, by default, mist-trigger-setup is true, and it will "Overwrite Mist triggers with the ones built into catalyst-api". No issue so far.

However, in cli help:

livepeer-catalyst-api -h
...
  -no-mist
    	Disable all Mist integrations. Should only be used for development and CI (default true)
  -no-mist-scrape-metrics
    	Scrape statistics from MistServer and publish to RabbitMQ (default true)
  -no-mist-trigger-setup
    	Overwrite Mist triggers with the ones built into catalyst-api (default true)
...

The option name is inverted to -no-mist-trigger-setup, but it still shows the default value true and help msg for mist-trigger-setup, which are opposite in logic.

The issue also apply to other InvertedBoolFlag options, as you can see above.

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