Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

specifying a 'full' option with a 'no-' prefix goes unnoticed #75

@GerHobbelt

Description

@GerHobbelt

Example:

   var options = {
      noLineNumbers: {
         abbr: 'n',
         full: 'no-line-numbers'
      }
   };

will be an option which won't ever be matched, because when you pass --no-line-numbers as a CLI argument, that one will be parsed as the UNKNOWN option --line-numbers, which is then interpreted as a boolean flag which is set to false thanks to the no- prefix.

This is technically a option set developer issue, but I would rather see nomnom catch this incorrect spec and barf a hairball during options parsing so that these mistakes are caught pronto.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions