Skip to content

Commit

Permalink
Merge pull request #1133 from stuartpb/only-ignore-output-subdir
Browse files Browse the repository at this point in the history
Don't ignore output paths that contain all input (fixes #1129)
  • Loading branch information
zachleat authored Nov 19, 2020
2 parents 1d7a967 + 2a5b2cd commit 970a90d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/EleventyFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,10 @@ class EleventyFiles {
);
}

files = files.concat(TemplateGlob.map("!" + this.outputDir + "/**"));
// ignore output dir unless that would occlude all input
if (!TemplatePath.startsWithSubPath(this.inputDir, this.outputDir)) {
files = files.concat(TemplateGlob.map("!" + this.outputDir + "/**"));
}

return files;
}
Expand Down

0 comments on commit 970a90d

Please sign in to comment.