about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAleksey Kladov <aleksey.kladov@gmail.com>2021-07-13 15:02:29 +0300
committerAleksey Kladov <aleksey.kladov@gmail.com>2021-07-13 15:02:29 +0300
commitcd6df6935f6c5432a9c46c702563939be8880f2c (patch)
treee4c6b4e5b8d407bc179961b0ce25be969879301b
parentf6896f83560aa6ac93f8f2da41fee8fdd4358898 (diff)
minor: make sure that project_root works correctly
-rw-r--r--crates/sourcegen/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/sourcegen/src/lib.rs b/crates/sourcegen/src/lib.rs
index 9197dbed8f6..2d280663426 100644
--- a/crates/sourcegen/src/lib.rs
+++ b/crates/sourcegen/src/lib.rs
@@ -191,5 +191,7 @@ fn normalize_newlines(s: &str) -> String {
 
 pub fn project_root() -> PathBuf {
     let dir = env!("CARGO_MANIFEST_DIR");
-    PathBuf::from(dir).parent().unwrap().parent().unwrap().to_owned()
+    let res = PathBuf::from(dir).parent().unwrap().parent().unwrap().to_owned();
+    assert!(res.join("bors.toml").exists());
+    res
 }