Skip to content

parseOptions should throw an error if the option string doesn't start with '-' #614

@nfischer

Description

@nfischer

parseOptions should throw an error it's asked to parse a string that doesn't start with -. Currently, it returns the default options, but I don't really see any good reason why.

We don't appear to be relying on this behavior, since I just replaced that return with a throw new Error and all the tests still passed.

This could be helpful for #590, but doesn't necessarily block it. After this is fixed, we should also refactor the change in #590 to take advantage of it though.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions