fix: improve assimp version output and unit test

This commit is contained in:
Jörg Krzeslak 2026-08-10 21:42:41 +02:00
parent 56971d68c4
commit 104c4af782
2 changed files with 3 additions and 2 deletions

View File

@ -121,7 +121,8 @@ if (process.env.NODE_ENV === "production") {
}
if (stdout) {
console.log(`assimp ${stdout.split("\n")[5]}`);
const firstLines = (stdout || "").split("\n");
console.log(`assimp ${firstLines[5] || firstLines[0] || ""}`);
}
});

View File

@ -27,7 +27,7 @@ mock.module("node:child_process", () => ({
// assimp's real output is multi-line; the source reads line index 5.
if (cmd.startsWith("assimp")) {
cb(null, "l1\nl2\nl3\nl4\nl5\nassimp v1.0.0\n");
cb(null, "l1\nl2\nl3\nl4\nl5\nVersion 1.0.0 (GIT commit abc123)\n");
return;
}