« get me outta code hell

nicer multiple matches output - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2022-03-06 22:15:02 -0400
committer(quasar) nebula <qznebula@protonmail.com>2022-03-06 22:15:02 -0400
commit2a9a7a61c1c5eefd51bc1d5d87ff99cf2f1bf5b4 (patch)
tree7bffd29bf2e414d155f07b4e74e98f9d91bf23dd
parenta21cba2433f3bea21c7d5d97be7165b55e10b1eb (diff)
nicer multiple matches output
-rw-r--r--src/util/find.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/find.js b/src/util/find.js
index fc82ba9..dd39bad 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.`);
     }