Merge branch 'imag-ignore-dotd-binaries' into master

This commit is contained in:
Matthias Beyer 2019-04-22 14:28:40 +02:00
commit d561bef939

View file

@ -134,6 +134,13 @@ fn get_commands(out: &mut Stdout) -> Vec<String> {
.and_then(|s| s.splitn(2, "-").nth(1).map(String::from))
)
})
.filter(|path| if cfg!(debug_assertions) {
// if we compile in debug mode during development, ignore everything that ends with
// ".d", as developers might use the ./target/debug/ directory directly in `$PATH`.
!path.ends_with(".d")
} else {
true
})
.collect::<Vec<String>>()
};