Package: sensible-utils Version: 0.0.12 Severity: minor File: /usr/bin/sensible-editor Tags: patch
sensible-editor is not discarding the stderr from which, thus its error messages are printed when EDITOR VISUAL and SELECTED_EDITOR are empty: % sensible-editor testfile usage: which [-as] program ... usage: which [-as] program ... usage: which [-as] program ... Please swallow the stderr: -[ "$(which $EDITOR || true)" = "$p" ] && EDITOR= -[ "$(which $VISUAL || true)" = "$p" ] && VISUAL= -[ "$(which $SELECTED_EDITOR || true)" = "$p" ] && SELECTED_EDITOR= +[ "$(which $EDITOR 2>/dev/null|| true)" = "$p" ] && EDITOR= +[ "$(which $VISUAL 2>/dev/null|| true)" = "$p" ] && VISUAL= +[ "$(which $SELECTED_EDITOR 2>/dev/null|| true)" = "$p" ] && SELECTED_EDITOR= Or skip the check if they are empty: [ -n "$EDITOR" ] && [ "$(which $EDITOR || true)" = "$p" ] && EDITOR= [ -n "$EDITOR" ] && [ "$(which $VISUAL || true)" = "$p" ] && VISUAL= [ -n "$EDITOR" ] && [ "$(which $SELECTED_EDITOR || true)" = "$p" ] && SELECTED_EDITOR= -- System Information: Debian Release: buster/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.19.0-4-amd64 (SMP w/4 CPU cores) Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled -- no debconf information