From b6cd0a5f023970b09a747a8ec3ed28ca1f41dc60 Mon Sep 17 00:00:00 2001 From: kevin zhao Date: Wed, 19 Nov 2025 20:37:44 +0000 Subject: [PATCH] calling it run() --- codex-rs/cli/src/main.rs | 2 +- codex-rs/execpolicy2/src/cli.rs | 2 +- codex-rs/execpolicy2/src/main.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/codex-rs/cli/src/main.rs b/codex-rs/cli/src/main.rs index 7d701b9552..1cb308b23b 100644 --- a/codex-rs/cli/src/main.rs +++ b/codex-rs/cli/src/main.rs @@ -329,7 +329,7 @@ fn run_update_action(action: UpdateAction) -> anyhow::Result<()> { } fn run_execpolicy_check(cli: ExecPolicyCheckCommand) -> anyhow::Result<()> { - let json = cli.to_json()?; + let json = cli.run()?; println!("{json}"); Ok(()) } diff --git a/codex-rs/execpolicy2/src/cli.rs b/codex-rs/execpolicy2/src/cli.rs index d7f5edb5ab..83dbecdcde 100644 --- a/codex-rs/execpolicy2/src/cli.rs +++ b/codex-rs/execpolicy2/src/cli.rs @@ -32,7 +32,7 @@ pub struct ExecPolicyCheckCommand { impl ExecPolicyCheckCommand { /// Load the policies for this command, evaluate the command, and render JSON output. - pub fn to_json(&self) -> Result { + pub fn run(&self) -> Result { let policy = load_policies(&self.policies)?; let evaluation = policy.check(&self.command); diff --git a/codex-rs/execpolicy2/src/main.rs b/codex-rs/execpolicy2/src/main.rs index 2e1ca2cad0..b59bcda1f1 100644 --- a/codex-rs/execpolicy2/src/main.rs +++ b/codex-rs/execpolicy2/src/main.rs @@ -18,7 +18,7 @@ fn main() -> Result<()> { } fn cmd_check(cmd: ExecPolicyCheckCommand) -> Result<()> { - let json = cmd.to_json()?; + let json = cmd.run()?; println!("{json}"); Ok(()) }