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

osx
Adam Veldhousen 8 years ago
parent 2bf0a7672b
commit 812385ab1f
Signed by: adam
GPG Key ID: 6DB29003C6DD1E4B

@ -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

Loading…
Cancel
Save