-
In 19ab4fac (pacdiff: Add option to use sudo/sudoedit to manage files, 2021-03-27), pacdiff was taught to accept -s to run various commands with $SUDO. This introduced many instances of $SUDO in merge_file() where most of them are unnecessary. In particular, it is not necessary to $SUDO to write the temporary files as /tmp should be writable by all[0][1]. Also, the usage of sudoedit when comparing the original file with the merge result is unnecessary. This is because root permissions are not really required since users should not write to the original file anyway. The merged file will be used to overwrite the original file at the end of the function anyway. Remove these unnecessary usages of $SUDO. [0]: https://unix.stackexchange.com/a/71625 [1]: https://serverfault.com/a/427290 Signed-off-by:
Denton Liu <liu.denton@gmail.com> Signed-off-by:
Daniel M. Capella <polyzen@archlinux.org>