aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2024-12-17 21:15:34 -0700
committerMelody Horn <melody@boringcactus.com>2024-12-17 21:15:34 -0700
commitfc6f64a92e00bf97dcb5b6ea4e7a4a6eca190f03 (patch)
tree16396fd6e5e1294b70e92251a74e9c2e6270c8ad /src
parentb59dcd1cf227345fce63a4202a5c10e21e7e29bd (diff)
downloadmakers-fc6f64a92e00bf97dcb5b6ea4e7a4a6eca190f03.tar.gz
makers-fc6f64a92e00bf97dcb5b6ea4e7a4a6eca190f03.zip
don't irreversibly strip a leading ./ in get_target
Diffstat (limited to 'src')
-rw-r--r--src/makefile/mod.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/makefile/mod.rs b/src/makefile/mod.rs
index c37e948..d746ed1 100644
--- a/src/makefile/mod.rs
+++ b/src/makefile/mod.rs
@@ -303,7 +303,11 @@ impl<'a> Makefile<'a> {
let follow_gnu = cfg!(feature = "full");
#[cfg(feature = "full")]
- let name = name.strip_prefix("./").unwrap_or(name);
+ if let Some(name_without_leading_dot_slash) = name.strip_prefix("./") {
+ if let Ok(result) = self.get_target(name_without_leading_dot_slash) {
+ return Ok(result);
+ }
+ }
let exists_but_infer_anyway = if follow_gnu {
self.targets