yay v8.998.r83.g31aca68 - libalpm v11.0.1
yay -G silently overwrites entire directories.
streetwalrus@Akatsuki:~
$ mkdir fontconfig
streetwalrus@Akatsuki:~
$ touch fontconfig/asdf
streetwalrus@Akatsuki:~
$ ls fontconfig
asdf
streetwalrus@Akatsuki:~
$ yay -G fontconfig
:: Querying AUR...
:: Downloaded PKGBUILD from ABS (1/1): fontconfig
streetwalrus@Akatsuki:~
$ ls fontconfig
fontconfig.hook fontconfig.install PKGBUILD
I purposely made this change of behaviour. It allows you to update pkgbuilds via -G. Otherwise you would have to delete it then run -G.
As a safety feature it could be made to overwrite only if there is a pkgbuild in the directory.
That is an option. Recursively removing a directory without even asking for confirmation is a terrible terrible idea. I think the best way to do this would be to add a -f flag to -G, and refuse overwriting anything without it.
Most helpful comment
That is an option. Recursively removing a directory without even asking for confirmation is a terrible terrible idea. I think the best way to do this would be to add a
-fflag to-G, and refuse overwriting anything without it.