We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf602d6 commit 29231bcCopy full SHA for 29231bc
attr/src/lib.rs
@@ -102,10 +102,12 @@ impl Intermediate {
102
}
103
104
pub fn schema_from_filepaths(paths: &[&Path]) -> anyhow::Result<OrmliteSchema> {
105
- let cwd = env::var("CARGO_MANIFEST_DIR")
+ let cwd = env::var("CARGO_RUSTC_CURRENT_DIR")
106
+ .or_else(|_| env::var("CARGO_MANIFEST_DIR"))
107
.map(PathBuf::from)
108
.or_else(|_| env::current_dir())
109
.expect("Failed to get current directory for schema");
110
+
111
let paths = paths.iter().map(|p| cwd.join(p)).collect::<Vec<_>>();
112
let invalid_paths = paths.iter().filter(|p| fs::metadata(p).is_err()).collect::<Vec<_>>();
113
if !invalid_paths.is_empty() {
0 commit comments