From 233ae12d262d526dd34daba12199de8cf44a02e5 Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Thu, 30 Mar 2023 16:57:01 +0800 Subject: [PATCH] Quote patterns in error message (#14631) --- src/cli/expand-patterns.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cli/expand-patterns.js b/src/cli/expand-patterns.js index 14994ed46..c97960d6d 100644 --- a/src/cli/expand-patterns.js +++ b/src/cli/expand-patterns.js @@ -107,9 +107,10 @@ async function* expandPatternsInternal(context) { try { result = await fastGlob(glob, globOptions); } catch ({ message }) { - /* c8 ignore next */ - yield { error: `${errorMessages.globError[type]}: ${input}\n${message}` }; - /* c8 ignore next */ + /* c8 ignore next 4 */ + yield { + error: `${errorMessages.globError[type]}: "${input}".\n${message}`, + }; continue; }