status: show active operator policy

This commit is contained in:
Vincent Koc
2026-03-06 01:14:20 -05:00
parent 42e9c9ae12
commit 120c686de4

View File

@@ -266,6 +266,18 @@ export async function statusAllCommand(
).length;
const overviewRows = [
(() => {
const operatorPolicy = snap?.policy;
if (!operatorPolicy?.exists) {
return { Item: "Operator policy", Value: "not configured" };
}
return {
Item: "Operator policy",
Value: operatorPolicy.valid
? `${operatorPolicy.path} · ${operatorPolicy.lockedPaths.length} locked path${operatorPolicy.lockedPaths.length === 1 ? "" : "s"}`
: `${operatorPolicy.path} · invalid`,
};
})(),
{ Item: "Version", Value: VERSION },
{ Item: "OS", Value: osSummary.label },
{ Item: "Node", Value: process.versions.node },