fix: build script venv handling and lint fixes

- Use /opt/venv directly when --entrypoint bash bypasses entrypoint.sh
- Use sys.executable for all pip calls (not bare pip)
- Override entrypoint in CI workflow to avoid startup banner
- Fix Biome formatting (template literals, try/catch blocks)
This commit is contained in:
SnapOtter
2026-06-13 20:48:27 +08:00
parent d0732d4a58
commit b1e94bd988
4 changed files with 69 additions and 60 deletions
+13 -7
View File
@@ -655,15 +655,21 @@ export async function importBundleArchive(
if (existsSync(stagingFixups)) {
const wheels = readdirSync(stagingFixups).filter((f) => f.endsWith(".whl"));
if (wheels.length > 0) {
const venvPython =
(process.env.PYTHON_VENV_PATH || join(AI_DIR, "venv")) + "/bin/python3";
const venvPython = `${process.env.PYTHON_VENV_PATH || join(AI_DIR, "venv")}/bin/python3`;
for (const wheel of wheels) {
try {
execFileSync(venvPython, [
"-m", "pip", "install", "--no-index",
`--find-links=${stagingFixups}`,
wheel.split("-")[0],
], { stdio: "ignore", timeout: 30_000 });
execFileSync(
venvPython,
[
"-m",
"pip",
"install",
"--no-index",
`--find-links=${stagingFixups}`,
wheel.split("-")[0],
],
{ stdio: "ignore", timeout: 30_000 },
);
} catch {
// Non-fatal
}