« get me outta code hell

upd8: reportDirectoryErrors messaging - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-10-24 07:08:20 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-10-24 07:08:20 -0300
commit363fafe8abec7cab4cf24e32af5b283e7813f8c5 (patch)
treeb5df1c685f5689da955a6c6cc6d6caf56a541362 /src
parente8ef0dd13b98a86a1c9be5d359920bc15522679e (diff)
upd8: reportDirectoryErrors messaging
Diffstat (limited to 'src')
-rwxr-xr-xsrc/upd8.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/upd8.js b/src/upd8.js
index ae072d5a..0bceea8d 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -1798,10 +1798,17 @@ async function main() {
       if (!paragraph) console.log('');
       niceShowAggregate(aggregate);
 
-      logWarn`The above duplicate directories were detected while reviewing data files.`;
-      logWarn`Since it's impossible to automatically determine which one's directory is`;
-      logWarn`correct, the build can't continue. Specify unique 'Directory' fields in`;
-      logWarn`some or all of these data entries to resolve the errors.`;
+      if (aggregate.errors.find(err => err.message.toLowerCase().includes('duplicate'))) {
+        logWarn`The above duplicate directories were detected while reviewing data files.`;
+        logWarn`Since it's impossible to automatically determine which one's directory is`;
+        logWarn`correct, the build can't continue. Specify unique 'Directory' fields in`;
+        logWarn`some or all of these data entries to resolve the errors.`;
+      } else {
+        logWarn`The above directory errors were detected while reviewing data files.`;
+        logWarn`Since it's impossible to automatically fill in working directories,`;
+        logWarn`the build can't continue. Manually specify 'Directory' fields in`;
+        logWarn`some or all of these data entries to resolve the errors.`;
+      }
 
       console.log('');
       paragraph = true;