mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-24 04:29:25 +02:00
Remove .gradletasknamecache before regenerating it
Remove the .gradletasknamecache file to avoid having an unnecessary newline at the top of the file when regenerating it.
This commit is contained in:
parent
11e098a0f6
commit
2c793a844c
1 changed files with 8 additions and 4 deletions
|
|
@ -97,8 +97,10 @@ _gradle_tasks () {
|
|||
if [[ -f build.gradle ]]; then
|
||||
_gradle_arguments
|
||||
if _gradle_does_task_list_need_generating; then
|
||||
# First make an empty file
|
||||
echo '' > .gradletasknamecache
|
||||
# First empty the old cache file
|
||||
if [ -f .gradletasknamecache ]; then
|
||||
rm .gradletasknamecache
|
||||
fi
|
||||
# Then append the rest of the lines to that file
|
||||
output=$(gradle tasks --all)
|
||||
_gradle_parse_tasks_to_gradletasknamecache $output
|
||||
|
|
@ -111,8 +113,10 @@ _gradlew_tasks () {
|
|||
if [[ -f build.gradle ]]; then
|
||||
_gradle_arguments
|
||||
if _gradle_does_task_list_need_generating; then
|
||||
# First make an empty file
|
||||
echo '' > .gradletasknamecache
|
||||
# First empty the old cache file
|
||||
if [ -f .gradletasknamecache ]; then
|
||||
rm .gradletasknamecache
|
||||
fi
|
||||
# Then append the rest of the lines to that file
|
||||
output=$(./gradlew tasks --all)
|
||||
_gradle_parse_tasks_to_gradletasknamecache $output
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue