From c7cffdd26c3916efcb04524e5acd0e9be1706222 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 19 Aug 2026 12:09:16 -0400 Subject: [PATCH] Move prebuilt reader/note-editor files without the shell The shell glob in the mv breaks on Windows paths, so every Windows build silently fell back to building the submodules from source. --- js-build/note-editor.js | 6 +++++- js-build/reader.js | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/js-build/note-editor.js b/js-build/note-editor.js index 1435730342..581f85cee8 100644 --- a/js-build/note-editor.js +++ b/js-build/note-editor.js @@ -30,9 +30,13 @@ async function getZoteroNoteEditor(signatures) { `cd ${tmpDir}` + ` && (test -f ${filename} || curl -f ${url} -o ${filename})` + ` && unzip ${filename} zotero/* -d ${targetDir}` - + ` && mv ${path.join(targetDir, 'zotero', '*')} ${targetDir}` ); + // Move the contents of zotero/ up a level (not in the shell, whose glob + // handling breaks on Windows paths) + for (let entry of await fs.readdir(path.join(targetDir, 'zotero'))) { + await fs.move(path.join(targetDir, 'zotero', entry), path.join(targetDir, entry)); + } await fs.remove(path.join(targetDir, 'zotero')); } catch (e) { diff --git a/js-build/reader.js b/js-build/reader.js index 12b5df6a92..6f5f631e33 100644 --- a/js-build/reader.js +++ b/js-build/reader.js @@ -30,9 +30,13 @@ async function getReader(signatures) { `cd ${tmpDir}` + ` && (test -f ${filename} || curl -f ${url} -o ${filename})` + ` && unzip ${filename} zotero/* -d ${targetDir}` - + ` && mv ${path.join(targetDir, 'zotero', '*')} ${targetDir}` ); + // Move the contents of zotero/ up a level (not in the shell, whose glob + // handling breaks on Windows paths) + for (let entry of await fs.readdir(path.join(targetDir, 'zotero'))) { + await fs.move(path.join(targetDir, 'zotero', entry), path.join(targetDir, entry)); + } await fs.remove(path.join(targetDir, 'zotero')); } catch (e) {