diff --git a/buildroot/share/git/mfpr b/buildroot/share/git/mfpr
index bff9834bc18..b853c6929e4 100755
--- a/buildroot/share/git/mfpr
+++ b/buildroot/share/git/mfpr
@@ -23,9 +23,7 @@ OLDBRANCH=${INFO[5]}
 # See if it's been pushed yet
 if [ -z "$(git branch -vv | grep ^\* | grep \\[origin)" ]; then firstpush; fi
 
-which xdg-open >/dev/null && TOOL=xdg-open
-which gnome-open >/dev/null && TOOL=gnome-open
-which open >/dev/null && TOOL=open
+OPEN=$(echo $(which gnome-open xdg-open open) | awk '{ print $1 }')
 URL="https://github.com/$ORG/$REPO/compare/$TARG...$FORK:$BRANCH?expand=1"
 
 if [ -z "$OPEN" ]; then