mirror of
https://github.com/openai/codex.git
synced 2026-10-29 19:08:43 +00:00
feat: remove OPENAI_API_KEY from env and mlock if set
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
//! This allows us to ship a completely separate set of functionality as part
|
||||
//! of the `codex-exec` binary.
|
||||
use clap::Parser;
|
||||
use codex_arg0::PreMainArgs;
|
||||
use codex_arg0::arg0_dispatch_or_else;
|
||||
use codex_common::CliConfigOverrides;
|
||||
use codex_exec::Cli;
|
||||
@@ -25,7 +26,11 @@ struct TopCli {
|
||||
}
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
arg0_dispatch_or_else(|codex_linux_sandbox_exe| async move {
|
||||
arg0_dispatch_or_else(false, |pre_main_args| async move {
|
||||
let PreMainArgs {
|
||||
codex_linux_sandbox_exe,
|
||||
openai_api_key: _,
|
||||
} = pre_main_args;
|
||||
let top_cli = TopCli::parse();
|
||||
// Merge root-level overrides into inner CLI struct so downstream logic remains unchanged.
|
||||
let mut inner = top_cli.inner;
|
||||
|
||||
Reference in New Issue
Block a user