mirror of
https://github.com/openai/codex.git
synced 2026-11-30 00:10:49 +00:00
Add docc
This commit is contained in:
@@ -234,6 +234,7 @@ fn format_exit_messages(exit_info: AppExitInfo, color_enabled: bool) -> Vec<Stri
|
||||
lines
|
||||
}
|
||||
|
||||
/// Handle the app exit and print the results. Optionally run the update action.
|
||||
fn handle_app_exit(exit_info: AppExitInfo) -> 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();
|
||||
|
||||
@@ -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<UpdateAction> {
|
||||
let exe = std::env::current_exe().unwrap_or_default();
|
||||
|
||||
Reference in New Issue
Block a user