Skip to content

Commit

Permalink
Passthrough copy files would log to the console twice.
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Jul 12, 2024
1 parent 9698667 commit 8dbc554
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -1158,12 +1158,20 @@ Arguments:
};

watcher.on("change", async (path) => {
this.logger.forceLog(`File changed: ${path}`);
// Emulated passthrough copy logs from the server
if (!this.eleventyServe.isEmulatedPassthroughCopyMatch(path)) {
this.logger.forceLog(`File changed: ${path}`);
}

await watchRun(path);
});

watcher.on("add", async (path) => {
this.logger.forceLog(`File added: ${path}`);
// Emulated passthrough copy logs from the server
if (!this.eleventyServe.isEmulatedPassthroughCopyMatch(path)) {
this.logger.forceLog(`File added: ${path}`);
}

this.fileSystemSearch.add(path);
await watchRun(path);
});
Expand Down

0 comments on commit 8dbc554

Please sign in to comment.