gradle: adopt _bash_it_find_in_ancestor()
This commit is contained in:
@@ -3,19 +3,10 @@ about-plugin 'Add a gw command to use gradle wrapper if present, else use system
|
||||
|
||||
function gw() {
|
||||
local file="gradlew"
|
||||
local curr_path="${PWD}"
|
||||
local result="gradle"
|
||||
local result
|
||||
|
||||
# Search recursively upwards for file.
|
||||
until [[ "${curr_path}" == "/" ]]; do
|
||||
if [[ -e "${curr_path}/${file}" ]]; then
|
||||
result="${curr_path}/${file}"
|
||||
break
|
||||
else
|
||||
curr_path=$(dirname "${curr_path}")
|
||||
fi
|
||||
done
|
||||
result="$(_bash-it-find-in-ancestor "${file}")"
|
||||
|
||||
# Call gradle
|
||||
"${result}" $*
|
||||
"${result:-gradle}" $*
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user