diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2019-04-22 14:24:46 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2019-04-22 14:24:46 +0200 |
commit | fd980299a5d25cba4e2e73ee2b4a477776314b06 (patch) | |
tree | f649284d2f339d8c30cd831cfd5afb7be634f395 /bin/core | |
parent | 1876220d83492b1e3dde2f36e19ef96dd6d16400 (diff) |
Ignore ".d" binaries in debug build
The comment in the patch should be self-explanatory.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'bin/core')
-rw-r--r-- | bin/core/imag/src/main.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/core/imag/src/main.rs b/bin/core/imag/src/main.rs index f866794c..590c1bbc 100644 --- a/bin/core/imag/src/main.rs +++ b/bin/core/imag/src/main.rs @@ -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>>() }; |