mirror of
https://github.com/openai/codex.git
synced 2026-11-02 19:43:24 +00:00
chore: upgrade to Rust 1.89
This commit is contained in:
@@ -48,18 +48,16 @@ pub fn generate_ts(out_dir: &Path, prettier: Option<&Path>) -> Result<()> {
|
||||
}
|
||||
|
||||
// Format with Prettier by passing individual files (no shell globbing)
|
||||
if let Some(prettier_bin) = prettier {
|
||||
if !ts_files.is_empty() {
|
||||
let status = Command::new(prettier_bin)
|
||||
.arg("--write")
|
||||
.args(ts_files.iter().map(|p| p.as_os_str()))
|
||||
.status()
|
||||
.with_context(|| {
|
||||
format!("Failed to invoke Prettier at {}", prettier_bin.display())
|
||||
})?;
|
||||
if !status.success() {
|
||||
return Err(anyhow!("Prettier failed with status {}", status));
|
||||
}
|
||||
if let Some(prettier_bin) = prettier
|
||||
&& !ts_files.is_empty()
|
||||
{
|
||||
let status = Command::new(prettier_bin)
|
||||
.arg("--write")
|
||||
.args(ts_files.iter().map(|p| p.as_os_str()))
|
||||
.status()
|
||||
.with_context(|| format!("Failed to invoke Prettier at {}", prettier_bin.display()))?;
|
||||
if !status.success() {
|
||||
return Err(anyhow!("Prettier failed with status {}", status));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user