pipes which output to dev null so when which fails it doesn't print out an error

osx
Adam Veldhousen 2016-05-18 10:39:13 -05:00
parent 2bf0a7672b
commit 812385ab1f
Signed by: adam
GPG Key ID: 6DB29003C6DD1E4B
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ function printmotd(){
if [[ -f $GOPATH/bin/fortune ]]; then
echo ""
$GOPATH/bin/fortune -file="$GOPATH/bin/fortunes.txt"
elif [[ -f $(which fortune) ]]; then
elif [[ -f $(which fortune 2>/dev/null) ]]; then
echo ""
fortune
fi