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 8c229c6 commit bcff594Copy full SHA for bcff594
1 file changed
src/uu/stdbuf/build.rs
@@ -90,9 +90,8 @@ fn main() {
90
// OUT_DIR is always .../target/[triple/]{profile}/build/{pkg-hash}/out, so the profile
91
// is exactly 3 parent levels up — regardless of whether a target triple is in the path.
92
let profile = Path::new(&out_dir)
93
- .parent() // .../build/{pkg-hash}
94
- .and_then(|p| p.parent()) // .../build
95
- .and_then(|p| p.parent()) // .../{profile}
+ .ancestors()
+ .nth(3)
96
.and_then(|p| p.file_name())
97
.and_then(|s| s.to_str())
98
.unwrap_or("debug");
0 commit comments