From 1f7eebf99829b78eb84db37826c18a6446969baa Mon Sep 17 00:00:00 2001 From: Daniel Edrisian Date: Tue, 14 Oct 2025 14:49:24 -0700 Subject: [PATCH] Add docc --- codex-rs/cli/src/main.rs | 2 ++ codex-rs/tui/src/lib.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/codex-rs/cli/src/main.rs b/codex-rs/cli/src/main.rs index 05d4a7035c..71fee4fd6b 100644 --- a/codex-rs/cli/src/main.rs +++ b/codex-rs/cli/src/main.rs @@ -234,6 +234,7 @@ fn format_exit_messages(exit_info: AppExitInfo, color_enabled: bool) -> Vec anyhow::Result<()> { let update_action = exit_info.update_action; let color_enabled = supports_color::on(Stream::Stdout).is_some(); @@ -246,6 +247,7 @@ fn handle_app_exit(exit_info: AppExitInfo) -> anyhow::Result<()> { Ok(()) } +/// Run the update action and print the result. fn run_update_action(action: UpdateAction) -> anyhow::Result<()> { println!(); let (cmd, args) = action.command_args(); diff --git a/codex-rs/tui/src/lib.rs b/codex-rs/tui/src/lib.rs index 061ca9cafb..bbd39fbfde 100644 --- a/codex-rs/tui/src/lib.rs +++ b/codex-rs/tui/src/lib.rs @@ -489,6 +489,8 @@ async fn run_ratatui_app( app_result } +/// Get the update action from the environment. +/// Returns `None` if not managed by npm, bun, or brew. #[cfg(not(debug_assertions))] pub(crate) fn get_update_action() -> Option { let exe = std::env::current_exe().unwrap_or_default();