mirror of
https://github.com/openai/codex.git
synced 2026-05-15 00:32:51 +00:00
codex: fix CI failure on PR #22199
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -66,11 +66,16 @@ pub(super) fn normalize_snapshot_paths(text: impl Into<String>) -> String {
|
||||
.into_iter()
|
||||
.rev()
|
||||
{
|
||||
let unix_prefix: String = "/tmp/project"
|
||||
.chars()
|
||||
.take(isolated_prefix.chars().count())
|
||||
.collect();
|
||||
text = text.replace(&format!("{isolated_prefix}…"), &format!("{unix_prefix}…"));
|
||||
let normalized = if isolated_prefix.chars().count() >= "/tmp/project".chars().count() {
|
||||
"/tmp/project".to_string()
|
||||
} else {
|
||||
let unix_prefix: String = "/tmp/project"
|
||||
.chars()
|
||||
.take(isolated_prefix.chars().count())
|
||||
.collect();
|
||||
format!("{unix_prefix}…")
|
||||
};
|
||||
text = text.replace(&format!("{isolated_prefix}…"), &normalized);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user