Skip to content

Commit 0ea7d6f

Browse files
committed
fix: download zotero in ci
1 parent a9d82d7 commit 0ea7d6f

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

packages/scaffold/src/core/tester/headless.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { execSync } from "node:child_process";
22
import process from "node:process";
3+
import { CACHE_DIR } from "src/constant.js";
34
import { isDebug, isLinux } from "std-env";
45
import { Xvfb } from "xvfb-ts";
56
import { LOG_LEVEL, logger } from "../../utils/logger.js";
@@ -84,9 +85,11 @@ export async function installZoteroLinux() {
8485
}
8586

8687
logger.debug("Installing Zotero...");
87-
execSync("wget -O ./scaffold/cache/zotero.tar.bz2 'https://www.zotero.org/download/client/dl?platform=linux-x86_64&channel=beta'", { stdio: "pipe" });
88-
execSync("tar -xvf ./scaffold/cache/zotero.tar.bz2", { stdio: "pipe" });
88+
execSync(`cd ${CACHE_DIR}`);
89+
execSync("wget -O zotero.tar.bz2 'https://www.zotero.org/download/client/dl?platform=linux-x86_64&channel=beta'", { stdio: "pipe" });
90+
execSync("tar -xvf zotero.tar.bz2", { stdio: "pipe" });
8991

9092
// Set Environment Variable for Zotero Bin Path
91-
process.env.ZOTERO_PLUGIN_ZOTERO_BIN_PATH = `${process.cwd()}/./scaffold/cache/Zotero_linux-x86_64/zotero`;
93+
process.env.ZOTERO_PLUGIN_ZOTERO_BIN_PATH = `${process.cwd()}/Zotero_linux-x86_64/zotero`;
94+
execSync("cd -");
9295
}

0 commit comments

Comments
 (0)