Skip to content

glob negation breaks passthrough file copy #1496

Open
@binyamin

Description

@binyamin

Describe the bug
If one uses glob negation with passthrough file copy, nothing is copied and there is no error or warning.

To Reproduce

  1. Install @11ty/eleventy via npm
  2. Create file .eleventy.js, with the following contents:
    module.exports = (eleventyConfig) => {
        eleventyConfig.addPassthroughCopy("**/*!(.md)") 
    }
  3. Add a .txt and a .md file, for testing purposes.
  4. Run npx eleventy
  5. See that the .md file is passed through.

Expected behavior
If glob negation is used with passthrough file copy, the expression should be interpreted as expected. In our example, we would expect eleventy not to copy any markdown files.

Environment:

  • OS and Version: Windows 10
  • Eleventy Version: v0.11.1

Additional context
Surfaced in #1483 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions