Skip to content

cwd option does nothing? #105

@TwitchBronBron

Description

@TwitchBronBron

The cwd option is specified in the docs here.
image

However, It doesn't appear to be used anywhere in the picomatch source code. See this github text search. https://github.com/micromatch/picomatch/search?q=cwd

Here are some simple tests proving the cwd option isn't used.

var picomatch = require('picomatch');

console.log(
    picomatch.isMatch('file.txt', '*.txt')
); //true

console.log(
    picomatch.isMatch('C:/projects/file.txt', '*.txt', { cwd: 'C:/projects' })
); //false

console.log(
    picomatch.isMatch('file.txt', '*.txt', { cwd: 'totally/bogus/cwd' })
); //true

Does picomatch need to be updated to add the cwd option, or should all the unsupported options in the docs be removed?

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