gradle / gradle-completion

Gradle tab completion for bash and zsh
MIT License
1.02k stars 133 forks source link

FIX: error when noclobber is set #40

Closed yloiseau closed 6 years ago

yloiseau commented 6 years ago

When the noclobber option is set, the script fails since it can't overwrite existing files. This is fixed by using the >| trick to force overwrite.

Also, some double-quoting were added to prevent globbing and word splitting.

eriwen commented 6 years ago

Thanks for the PR @yloiseau! While I'm checking this out, can you please confirm that you've signed a Gradle CLA so I can accept this?

yloiseau commented 6 years ago

I confirm that I've signed a Gradle CLA

eriwen commented 6 years ago

Thank you @yloiseau. I need to dig deeper, but when I try regenerating the gradle tasks cache using bash 3.2 on macOS, it fails such that I end up with an empty task cache file.

eriwen commented 6 years ago

@yloiseau I found the issue I referenced above and have quoted a bunch of bash variables, so you'll need to rebase this. If you sign a CLA I'm happy to incorporate the noclobber fix here.

eriwen commented 6 years ago

Ok, sorry. I see you've signed a CLA. I've gone ahead and merged manually with 59b533b and 14db83155a5e748401000d60625523fbaad459f0 as separate commits. Thank you!