Skip to content

--ignore option not accepting glob #110

@hitochan777

Description

@hitochan777

According to the help shown by -h, --ignore option should accept glob.
However when I run with --ignore *.sqlite3, it throws an error saying:

(node:16493) UnhandledPromiseRejectionWarning: SyntaxError: Invalid regular expression: /*.sqlite3/: Nothing to repeat
This is because it uses RegExp to construct regexp object from the string and `*` is interpreted as arbitrary repetition but nothing precedes it (by the way RegExp is introduced in [this PR](https://github.com/zeit/micro-dev/pull/54)). 

Should we properly handle glob instead of relying on RegExp?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions