Bash find command

andydavies2020's Avatar


19 Oct, 2018 07:32 PM

When you run a (bash) shell script, the find command is pointing to a version in /c/windows/system32/, rather than the expected version which ships with git/bash (which would be /usr/bin/find)

You can see an example of this in my Crispin project, the output of which find is this line:

This used to point to /usr/bin/find at some point, as that is how I have always been running my tests (yay for dotnet core not being able to run a Solution file with the dotnet test command and not fall over on a non-test project).

Currently, I am working around the issue by specifying the find path completely, but I now have to go through a lot of build scripts to find (ha) which other ones are broken because of this.

  1. Support Staff 1 Posted by Owen McDonnell on 19 Oct, 2018 11:21 PM

    Owen McDonnell's Avatar

    Can you please link to a build where you used the find command with success.

  2. 2 Posted by andydavies2020 on 29 Oct, 2018 01:26 PM

    andydavies2020's Avatar

    Hi Owen,

    Sorry for the slow reply, I didn't get an email notification for the topic, and forgot until now.

    I've looked back through a couple of projects, and it apears the find call has never worked as expected, and the successful builds were from when the scripts were using gulp scripts to find & run the tests.

    So I guess my fault for not noticing it (and forgetting to put set -e at the top of the shell scripts so I notice errors). Still odd behaviour for the bash environment to favour a windows command though!

  3. Support Staff 3 Posted by Owen McDonnell on 31 Oct, 2018 07:33 PM

    Owen McDonnell's Avatar

    I think it just depends on where git/bash is in the path vs system32.

  4. Owen McDonnell closed this discussion on 31 Oct, 2018 07:33 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

21 Aug, 2019 11:06 PM
21 Aug, 2019 02:08 PM
21 Aug, 2019 01:37 PM
21 Aug, 2019 10:21 AM
21 Aug, 2019 09:10 AM


21 Aug, 2019 05:56 AM
21 Aug, 2019 03:08 AM
20 Aug, 2019 11:33 PM
20 Aug, 2019 08:07 PM
20 Aug, 2019 05:50 PM
20 Aug, 2019 12:35 PM