mirror of
https://github.com/openai/codex.git
synced 2026-05-01 18:06:47 +00:00
Move the foundational provider and token modules into codex-auth while keeping codex-core as the facade. Also move the corresponding unit tests and record the 3-PR migration checkpoints. Co-authored-by: Codex <noreply@openai.com>
16 lines
420 B
Rust
16 lines
420 B
Rust
#[derive(Debug)]
|
|
pub struct EnvVarError {
|
|
pub var: String,
|
|
pub instructions: Option<String>,
|
|
}
|
|
|
|
impl std::fmt::Display for EnvVarError {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
write!(f, "Missing environment variable: `{}`.", self.var)?;
|
|
if let Some(instructions) = &self.instructions {
|
|
write!(f, " {instructions}")?;
|
|
}
|
|
Ok(())
|
|
}
|
|
}
|