diff --git a/completion/available/gradle.completion.bash b/completion/available/gradle.completion.bash index 6ec8c697..786450a6 100644 --- a/completion/available/gradle.completion.bash +++ b/completion/available/gradle.completion.bash @@ -58,9 +58,9 @@ __gradle-set-cache-name() { __gradle-set-files-checksum() { # Cache MD5 sum of all Gradle scripts and modified timestamps - if builtin command -v md5 > /dev/null; then + if _command_exists md5; then gradle_files_checksum=$(md5 -q -s "$(cat "$cache_dir/$cache_name" | xargs ls -o 2>/dev/null)") - elif builtin command -v md5sum > /dev/null; then + elif _command_exists md5sum; then gradle_files_checksum=$(cat "$cache_dir/$cache_name" | xargs ls -o 2>/dev/null | md5sum | awk '{print $1}') else echo "Cannot generate completions as neither md5 nor md5sum exist on \$PATH"