Skip to content

Suggested replacement for addIgnoreFile doesn't work always #108

@dhilgarth

Description

@dhilgarth

With the attached .gitignore, the following code will return false

const ig = ignore.default();
ig.add(fs.readFileSync('.gitignore').toString());
console.log(ig.ignores('node_modules'));

I believe it's because of the BOM at the beginning of the file.

gitignore.zip

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