if [ ! "$@" = "" ]; then
# Cut off any command-line option we added in
X=$(echo $@ | cut -d' ' -f2)
- if [ "$(which $X)" = "" ]; then
+ if [ "$(which $X 2>/dev/null)" = "" ]; then
return 1
- elif [ ! -x $(which $X) ]; then
+ elif [ ! -x $(which $X 2>/dev/null) ]; then
return 2
fi
fi
X=$(echo $@ | cut -d' ' -f2)
# Test for built-in abcde.function
[ "$X" != "${X#abcde.}" ] && type $X >/dev/null 2>&1 && return
- if [ "$(which $X)" = "" ]; then
+ if [ "$(which $X 2>/dev/null)" = "" ]; then
log error "$X is not in your path." >&2
log info "Define the full path to the executable if it exists on your system." >&2
if [ -e /etc/debian_* ] ; then
log info "Hint: sudo apt-get install $MISSING_PACKAGE" >&2
fi
exit 1
- elif [ ! -x "$(which $X)" ]; then
+ elif [ ! -x "$(which $X 2>/dev/null)" ]; then
log error "$X is not executable." >&2
exit 1
fi
* Add a more better fix for the year lookup problem in abcde-musicbrainz-tool
Thanks to Tom Samstag for the patch. Closes Issue 57:
https://abcde.einval.com/bugzilla/show_bug.cgi?id=57
+ * Redirect stderr on "which" calls to clear up error noise on some
+ systems. Closes Issue 56:
+ https://abcde.einval.com/bugzilla/show_bug.cgi?id=56
abcde 2.8.1.