Merge branch 'master' of github.com:browsh-org/browsh

pull/114/head
Thomas Buckley-Houston 2018-07-11 11:55:58 +08:00
commit 3cc5485c2f
2 zmienionych plików z 14 dodań i 1 usunięć

Wyświetl plik

@ -4,6 +4,12 @@ set -e
# Install `dep` the current defacto dependency for Golang
GOLANG_DEP_VERSION=0.3.2
dep_url=https://github.com/golang/dep/releases/download/v$GOLANG_DEP_VERSION/dep-linux-amd64
if [ -z $GOPATH ]; then
echo '$GOPATH is not set, aborting'
exit 1
fi
curl -L -o $GOPATH/bin/dep $dep_url
chmod +x $GOPATH/bin/dep

Wyświetl plik

@ -104,7 +104,14 @@ func ensureFirefoxBinary() {
}
}
if _, err := os.Stat(*firefoxBinary); os.IsNotExist(err) {
Shutdown(errors.New("Firefox binary not found: " + *firefoxBinary))
if runtime.GOOS == "windows" {
*firefoxBinary = `c:\Program Files\Mozilla Firefox\firefox.exe`
if _, err := os.Stat(*firefoxBinary); os.IsNotExist(err) {
Shutdown(errors.New(`Firefox binary not found in: c:\Program Files (x86)\Mozilla Firefox\firefox.exe or ` + *firefoxBinary))
}
} else {
Shutdown(errors.New("Firefox binary not found: " + *firefoxBinary))
}
}
}