diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-07-13 12:02:52 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-13 12:02:52 +0000 |
| commit | 098a8e7b2f61a0d7c6bb1b7ad949969a9bc9356c (patch) | |
| tree | e4c6b4e5b8d407bc179961b0ce25be969879301b | |
| parent | f6896f83560aa6ac93f8f2da41fee8fdd4358898 (diff) | |
| parent | cd6df6935f6c5432a9c46c702563939be8880f2c (diff) | |
Merge #9588
9588: minor: make sure that project_root works correctly r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
| -rw-r--r-- | crates/sourcegen/src/lib.rs | 4 |
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 } |
