From 8d542f890fb882244af939a4953f6be79431b2ca Mon Sep 17 00:00:00 2001 From: Charles Cunningham Date: Thu, 29 Jan 2026 10:42:17 -0800 Subject: [PATCH] lint --- codex-rs/utils/cargo-bin/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/codex-rs/utils/cargo-bin/src/lib.rs b/codex-rs/utils/cargo-bin/src/lib.rs index d12b0711da..67539f41b0 100644 --- a/codex-rs/utils/cargo-bin/src/lib.rs +++ b/codex-rs/utils/cargo-bin/src/lib.rs @@ -1,3 +1,4 @@ +use path_absolutize::Absolutize; use std::env; use std::ffi; use std::ffi::OsString; @@ -123,6 +124,12 @@ fn cargo_target_dir() -> Result { Ok(path) } +fn absolutize_from_buck_or_cwd(path: PathBuf) -> Result { + path.absolutize() + .map(|abs| abs.into_owned()) + .map_err(|source| CargoBinError::CurrentDir { source }) +} + /// Macro that derives the path to a test resource at runtime, the value of /// which depends on whether Cargo or Bazel is being used to build and run a /// test. Note the return value may be a relative or absolute path.