From ec1942ddcc404adbe9cea3e11d87ed4043782b6c Mon Sep 17 00:00:00 2001 From: aweebit Date: Sat, 5 Aug 2023 03:42:38 +0300 Subject: [PATCH] Unclutter error message in broken passThrough checks Co-authored-by: John Gee --- lib/command.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/command.js b/lib/command.js index d190512ed..65559112a 100644 --- a/lib/command.js +++ b/lib/command.js @@ -749,7 +749,7 @@ Expecting one of '${allowedValues.join("', '")}'`); _checkForBrokenPassThrough(command, parent) { if (parent && command._passThroughOptions && !parent._enablePositionalOptions) { - throw new Error(`passThroughOptions cannot be used for '${command._name}' without turning on enablePositionalOptions for parent command${parent._name ? ` '${parent._name}'` : ''}`); + throw new Error(`passThroughOptions cannot be used for '${command._name}' without turning on enablePositionalOptions for parent command(s)`); } }