Skip to content

Commit aa7e222

Browse files
committed
improve find-in-jars stricter
1 parent dee4143 commit aa7e222

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

find-in-jars

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# @online-doc https://github.com/oldratlee/useful-scripts/blob/master/docs/java.md#beer-find-in-jars
1212
# @author Jerry Lee (oldratlee at gmail dot com)
1313

14-
readonly PROG=`basename $0`
14+
readonly PROG="`basename "$0"`"
1515

1616
usage() {
1717
[ -n "$1" -a "$1" != 0 ] && local out=/dev/stderr || local out=/dev/stdout
@@ -183,7 +183,7 @@ clearResponsiveMessage() {
183183
# find logic
184184
################################################################################
185185

186-
readonly jar_files="$(find "${dirs[@]}" -iname '*.jar')"
186+
readonly jar_files="$(find "${dirs[@]}" -iname '*.jar' -type f)"
187187
readonly total_count="$(echo "$jar_files" | wc -l)"
188188
[ -z "$jar_files" ] && {
189189
echo "No jar found!" 1>&2

0 commit comments

Comments
 (0)