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.
This commit is contained in:
Dan Stillman 2026-08-19 12:09:16 -04:00
parent da705c36ec
commit c7cffdd26c
2 changed files with 10 additions and 2 deletions

View file

@ -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) {

View file

@ -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) {