Skip to content

Listen ignore paths unexpectedly match subdirectories #44

@jcbpl

Description

@jcbpl

Per the Jekyll docs, paths specified in the exclude setting "are relative to the site's source directory," so adding lib/ to the excluded paths will exclude ./lib but not ./another/path/containing/lib. This works as expected in Jekyll itself, but not when running jekyll serve, because the regex defined in Watcher#listen_ignore_paths ends up matching any lib.

I'm pretty sure the fix is just changing listen_ignore_paths to anchor the pattern to the front of the string, e.g. Regexp.new(/^#{Regexp.escape(relative_path)}/), but I'm not sure if there might be unintended side effects.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions