From 2a9a7a61c1c5eefd51bc1d5d87ff99cf2f1bf5b4 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 6 Mar 2022 22:15:02 -0400 Subject: nicer multiple matches output --- src/util/find.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/util') diff --git a/src/util/find.js b/src/util/find.js index fc82ba9e..dd39bad9 100644 --- a/src/util/find.js +++ b/src/util/find.js @@ -4,6 +4,8 @@ import { logWarn } from './cli.js'; +import { inspect } from 'util'; + function warnOrThrow(mode, message) { switch (mode) { case 'error': @@ -88,7 +90,7 @@ function matchName(ref, data, mode) { if (matches.length > 1) { return warnOrThrow(mode, `Multiple matches for reference "${ref}". Please resolve:\n` + - matches.map(match => `- ${match.name} (${match.directory})\n`).join('') + + matches.map(match => `- ${inspect(match)}\n`).join('') + `Returning null for this reference.`); } -- cgit 1.3.0-6-gf8a5