From 0a2ac5ca3dc54c2fb957a4d01a36c37cfe9cbb5e Mon Sep 17 00:00:00 2001 From: Maxime Brazeilles Date: Wed, 28 Feb 2024 12:04:54 +0100 Subject: [PATCH] [FIX] Watch wrong files on CLI --- packages/mjml-cli/src/commands/watchFiles.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/mjml-cli/src/commands/watchFiles.js b/packages/mjml-cli/src/commands/watchFiles.js index bf2802a7a..55e724f15 100644 --- a/packages/mjml-cli/src/commands/watchFiles.js +++ b/packages/mjml-cli/src/commands/watchFiles.js @@ -99,7 +99,8 @@ export default (input, options) => { console.log(`Now watching file: ${filePath}`) const matchInputOption = input.reduce( - (found, file) => found || match(sync(path.resolve(file)), filePath), + (found, file) => + found || match(sync(path.resolve(file)), filePath)?.length > 0, false, )