fix(dogfood): probe cargo-zigbuild with a supported argument (#8177)

The local dogfood cross-build (#8124) checked for cargo-zigbuild with `cargo zigbuild --version`, which cargo-zigbuild 0.24.1 rejects, so `dogfood:servers` / `dogfood:all <target>` reported the tool missing even when it was installed. The probe now runs `cargo zigbuild --help`.

Co-authored-by: dengliu <[email protected]>
Цей коміт міститься в:
Deng Liuтаdengliu authored and GitHub committed 2026-12-05 16:02:28 +08:00
1 джерело cd0fe6c8f5
коміт 7a20b20b2d
1 file changed
+1 -1
+1 -1
Переглянути файл
@@ -324,7 +324,7 @@ export function buildDogfoodServer(root: string, arch: DogfoodServerArch): strin
/** Adds the musl target on first use instead of in every contributor's setup. Needs cargo-zigbuild and Zig. */
function ensureCrossTarget(root: string, target: string) {
const zigbuild = spawnSync("cargo", ["zigbuild", "--version"], { cwd: root, encoding: "utf8" });
const zigbuild = spawnSync("cargo", ["zigbuild", "--help"], { cwd: root, encoding: "utf8" });
if (zigbuild.status !== 0) {
throw new Error(
"cargo-zigbuild and Zig are needed to cross-build openidea-server: `mise run dogfood:servers` installs them, or install both yourself.",