d3f6507a2e432efe48a3b8ac8f45c32e7d2ab656

Author
Graeme Coupar <grambo@grambo.me.uk>
Committer
Graeme Coupar <grambo@grambo.me.uk>
Date

Message

Debian plugin now pipes which stderr to stdout

The debian plugin calls which to determine whether aptitude & sudo are
installed.  However, if these are not installed then the error output
from which will be output.  Since this isn't really an error condition,
this commit updates the which calls to pipe stderr to stdout, thus
hiding the error messages.

Diff

 1diff --git a/plugins/debian/debian.plugin.zsh b/plugins/debian/debian.plugin.zsh
 2index 39d3ef36a05280e9e285412afecba861278bd73c..da86b171182edcecc310fd46d8906a2379a2244c 100644
 3--- a/plugins/debian/debian.plugin.zsh
 4+++ b/plugins/debian/debian.plugin.zsh
 5@@ -6,14 +6,14 @@
 6 
 7 # Use aptitude if installed, or apt-get if not.
 8 # You can just set apt_pref='apt-get' to override it.
 9-if [[ -e $( which aptitude ) ]]; then
10+if [[ -e $( which aptitude 2>&1 ) ]]; then
11     apt_pref='aptitude'
12 else
13     apt_pref='apt-get'
14 fi
15 
16 # Use sudo by default if it's installed
17-if [[ -e $( which sudo ) ]]; then
18+if [[ -e $( which sudo 2>&1 ) ]]; then
19     use_sudo=1
20 fi
21