Skip to content

Commit 8e01fa9

Browse files
authored
fix(pacnew): Honor $DIFFPROG properly (#480)
### Description Add a fix to properly honor the `$DIFFPROG` environment variable (if defined) as the diff program to use with `pacdiff` when handling pacnew files. Takes priority over the `DiffProg` in the `arch-update.conf` configuration file. ### Fixed bug Fixes #479
1 parent 71aa8a7 commit 8e01fa9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib/common.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ check_su_cmd () {
175175

176176
# Definition of the diff program to use (if it is set in the arch-update.conf configuration file)
177177
check_diff_prog () {
178+
[ -n "${DIFFPROG}" ] && diff_prog="${DIFFPROG}"
179+
178180
if [ -n "${diff_prog}" ]; then
179181
if ! command -v "${diff_prog%% *}" > /dev/null; then
180182
error_msg "$(eval_gettext "The \${diff_prog} editor set for visualizing / editing differences of pacnew files in the \${name}.conf configuration file is not found\n")" && quit_msg

0 commit comments

Comments
 (0)