google_chrome: Fix browser detection on MacOS
This commit is contained in:
parent
e5782cef9b
commit
a3e0947e54
2 changed files with 4 additions and 6 deletions
|
@ -4,9 +4,8 @@ set -eu
|
|||
|
||||
URL="${2-}"
|
||||
|
||||
CHROME="$(which google-chrome 2>/dev/null)"
|
||||
if [ -z "$CHROME" ]; then
|
||||
if [ -f "/Applications/Google Chrome.app" ]; then
|
||||
if ! CHROME="$(which google-chrome 2>/dev/null)"; then
|
||||
if [ -d "/Applications/Google Chrome.app" ]; then
|
||||
CHROME="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
|
||||
else
|
||||
echo "ERR: Failed to find Google Chrome installation"
|
||||
|
|
|
@ -10,9 +10,8 @@ fi
|
|||
SOCKSPORT="$1"
|
||||
URL="${2-}"
|
||||
|
||||
CHROME="$(which google-chrome 2>/dev/null)"
|
||||
if [ -z "$CHROME" ]; then
|
||||
if [ -f "/Applications/Google Chrome.app" ]; then
|
||||
if ! CHROME="$(which google-chrome 2>/dev/null)"; then
|
||||
if [ -d "/Applications/Google Chrome.app" ]; then
|
||||
CHROME="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
|
||||
else
|
||||
echo "ERR: Failed to find Google Chrome installation"
|
||||
|
|
Loading…
Add table
Reference in a new issue