Skip to content

Commit 098a8e7

Browse files
bors[bot]matklad
andauthored
Merge #9588
9588: minor: make sure that project_root works correctly r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
2 parents f6896f8 + cd6df69 commit 098a8e7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/sourcegen/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,5 +191,7 @@ fn normalize_newlines(s: &str) -> String {
191191

192192
pub fn project_root() -> PathBuf {
193193
let dir = env!("CARGO_MANIFEST_DIR");
194-
PathBuf::from(dir).parent().unwrap().parent().unwrap().to_owned()
194+
let res = PathBuf::from(dir).parent().unwrap().parent().unwrap().to_owned();
195+
assert!(res.join("bors.toml").exists());
196+
res
195197
}

0 commit comments

Comments
 (0)