Skip to content

Commit

Permalink
use env::current_dir() in schema_from_filepaths()
Browse files Browse the repository at this point in the history
  • Loading branch information
nitn3lav committed Jan 7, 2024
1 parent 1144b88 commit 3268ec1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion attr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl Intermediate {
}

pub fn schema_from_filepaths(paths: &[&Path]) -> anyhow::Result<OrmliteSchema> {
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::<Vec<_>>();
let invalid_paths = paths.iter().filter(|p| fs::metadata(p).is_err()).collect::<Vec<_>>();
Expand Down

0 comments on commit 3268ec1

Please sign in to comment.