From 3268ec16757ec798f15e24dc714fc5f8ce27fb07 Mon Sep 17 00:00:00 2001 From: Valentin Leistner Date: Sun, 7 Jan 2024 04:51:13 +0100 Subject: [PATCH] use `env::current_dir()` in `schema_from_filepaths()` --- attr/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attr/src/lib.rs b/attr/src/lib.rs index d5ec68a..fd3000e 100644 --- a/attr/src/lib.rs +++ b/attr/src/lib.rs @@ -101,7 +101,7 @@ impl Intermediate { } pub fn schema_from_filepaths(paths: &[&Path]) -> anyhow::Result { - let cwd = env::var("CARGO_MANIFEST_DIR").unwrap_or_default(); + let cwd = env::current_dir().unwrap_or_default(); let cwd = PathBuf::from(cwd); let paths = paths.iter().map(|p| cwd.join(p)).collect::>(); let invalid_paths = paths.iter().filter(|p| fs::metadata(p).is_err()).collect::>();