Bug 1467077

Summary: sensible-editor calls 'which' without any parameters (prints use info of which)
Product: [Fedora] Fedora Reporter: Hedayat Vatankhah <hedayatv>
Component: sensible-utilsAssignee: Sandro Mani <manisandro>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: manisandro
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sensible-utils-0.0.9-6.fc26 sensible-utils-0.0.9-6.fc24 sensible-utils-0.0.9-6.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-27 16:52:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hedayat Vatankhah 2017-07-02 12:59:12 UTC
Description of problem:
When running sensible-editor (directly or via debchange) it prints usage guide for which, which is because of running commands like 'which $EDITOR' when EDITOR is not set. 
It doesn't happen in Debian/Ubuntu because they use a different implementation of which, which doesn't complain when run without any parameters. But in Fedora, if you run which with no parameters, its full usage guide is printed, which is annoying.

I suggest redirecting which's stderr to /dev/null at these initial lines like below:

[ "$(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=

Comment 1 Fedora Update System 2017-07-14 10:02:45 UTC
sensible-utils-0.0.9-6.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-003dabb204

Comment 2 Fedora Update System 2017-07-14 19:53:03 UTC
sensible-utils-0.0.9-6.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-003dabb204

Comment 3 Fedora Update System 2017-07-14 20:27:00 UTC
sensible-utils-0.0.9-6.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-444ad737fd

Comment 4 Fedora Update System 2017-07-14 22:56:58 UTC
sensible-utils-0.0.9-6.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-f0c6e7b0c3

Comment 5 Fedora Update System 2017-07-27 16:52:08 UTC
sensible-utils-0.0.9-6.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2017-07-27 19:50:19 UTC
sensible-utils-0.0.9-6.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2017-07-27 21:52:26 UTC
sensible-utils-0.0.9-6.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.