Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(scripts): skip the Debian package test when dpkg-deb is not installed

Shaurya Kesarwani38f8702a85b9
diff --git a/scripts/__tests__/cli-package-contents.test.mjs b/scripts/__tests__/cli-package-contents.test.mjs
index 3e7e835b6d..5e6655891d 100644
--- a/scripts/__tests__/cli-package-contents.test.mjs
+++ b/scripts/__tests__/cli-package-contents.test.mjs
@@ -116,7 +116,23 @@ test("package-manager consumers install and expose the TUI", () => {
);
});
-test("Debian packages install both commands", () => {
+// packages/deb/build.sh shells out to dpkg-deb, which Debian-family hosts
+// and the Linux CI runners have and macOS/Windows developer machines do not.
+// Without it the build exits 127 and the red reads as a packaging defect.
+function dpkgDebAvailable() {
+ try {
+ execFileSync("dpkg-deb", ["--version"], { stdio: "ignore" });
+ return true;
+ } catch {
+ return false;
+ }
+}
+
+test("Debian packages install both commands", (t) => {
+ if (!dpkgDebAvailable()) {
+ t.skip("dpkg-deb not on PATH");
+ return;
+ }
const work = fs.mkdtempSync(path.join(os.tmpdir(), "openhuman-deb-package-"));
const core = path.join(work, "core-fixture");
const tui = path.join(work, "tui-fixture");