import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; import { describe, expect, it } from "vitest"; import { withEnvAsync } from "../test-utils/env.js"; import {
collectExecSafeBinCoverageWarnings,
collectExecSafeBinTrustedDirHintWarnings,
maybeRepairExecSafeBinProfiles,
scanExecSafeBinCoverage,
scanExecSafeBinTrustedDirHints,
} from "./doctor/shared/exec-safe-bins.js";
it("warns when interpreter/custom safeBins entries are missing profiles in non-repair mode", () => { const warnings = collectExecSafeBinCoverageWarnings({
hits: scanExecSafeBinCoverage({
tools: {
exec: {
safeBins: ["python3", "myfilter"],
},
},
}),
doctorFixCommand: "openclaw doctor --fix",
});
expect(warnings.join("\n")).toContain( "tools.exec.safeBins includes interpreter/runtime 'python3'",
);
expect(warnings.join("\n")).toContain("openclaw doctor --fix");
});
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.