« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/upd8.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/upd8.js')
-rwxr-xr-xsrc/upd8.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/upd8.js b/src/upd8.js
index 3628bff5..306715dd 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -42,6 +42,7 @@ import wrap from 'word-wrap';
 
 import {mapAggregate, openAggregate, showAggregate} from '#aggregate';
 import CacheableObject from '#cacheable-object';
+import {stringifyCache} from '#cli';
 import {displayCompositeCacheAnalysis} from '#composite';
 import find, {bindFind, getAllFindSpecs} from '#find';
 import {processLanguageFile, watchLanguageFile, internalDefaultStringsFile}
@@ -2076,7 +2077,7 @@ async function main() {
     }
 
     try {
-      await writeFile(cacheFile, JSON.stringify(onlineThumbsCache ?? {}));
+      await writeFile(cacheFile, stringifyCache(onlineThumbsCache));
     } catch (caughtError) {
       writeError = caughtError;
     }
@@ -2133,7 +2134,7 @@ async function main() {
 
     if (onlineThumbsCache && !writeError) {
       try {
-        await writeFile(cacheFile, JSON.stringify(onlineThumbsCache));
+        await writeFile(cacheFile, stringifyCache(onlineThumbsCache));
       } catch (error) {
         console.error(error);
         logWarn`There was an error saving a local copy of the`;