Merge pull request #1057 from tymcauley/mask-fd-warning
Hide `which` warning when `fd` isn't installed
This commit is contained in:
@@ -65,7 +65,7 @@ include $(base_dir)/tools/torture.mk
|
|||||||
#########################################################################################
|
#########################################################################################
|
||||||
# Returns a list of files in directory $1 with file extension $2.
|
# Returns a list of files in directory $1 with file extension $2.
|
||||||
# If available, use 'fd' to find the list of files, which is faster than 'find'.
|
# If available, use 'fd' to find the list of files, which is faster than 'find'.
|
||||||
ifeq ($(shell which fd),)
|
ifeq ($(shell which fd 2> /dev/null),)
|
||||||
lookup_srcs = $(shell find -L $(1)/ -name target -prune -o -iname "*.$(2)" -print 2> /dev/null)
|
lookup_srcs = $(shell find -L $(1)/ -name target -prune -o -iname "*.$(2)" -print 2> /dev/null)
|
||||||
else
|
else
|
||||||
lookup_srcs = $(shell fd -L ".*\.$(2)" $(1))
|
lookup_srcs = $(shell fd -L ".*\.$(2)" $(1))
|
||||||
|
|||||||
Reference in New Issue
Block a user