mirror of
https://github.com/openai/codex.git
synced 2026-04-24 06:35:50 +00:00
Address stdin prompt review feedback
Remove an explicit return in the empty-stdin branch without changing behavior. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -1575,16 +1575,16 @@ fn read_prompt_from_stdin(behavior: StdinPromptBehavior) -> Option<String> {
|
||||
};
|
||||
|
||||
if buffer.trim().is_empty() {
|
||||
return match behavior {
|
||||
match behavior {
|
||||
StdinPromptBehavior::OptionalAppend => None,
|
||||
StdinPromptBehavior::RequiredIfPiped | StdinPromptBehavior::Forced => {
|
||||
eprintln!("No prompt provided via stdin.");
|
||||
std::process::exit(1);
|
||||
}
|
||||
};
|
||||
}
|
||||
} else {
|
||||
Some(buffer)
|
||||
}
|
||||
|
||||
Some(buffer)
|
||||
}
|
||||
|
||||
fn prompt_with_stdin_context(prompt: &str, stdin_text: &str) -> String {
|
||||
|
||||
Reference in New Issue
Block a user