don't check for chrome binary binary when impersonate is disabled
This commit is contained in:
parent
bffd709c41
commit
f85048c016
|
@ -95,8 +95,10 @@ func SetConfig(configFile string) (*Config, error) {
|
||||||
return nil, proxyPoolThirdpartyErr
|
return nil, proxyPoolThirdpartyErr
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, err := os.Stat(config.ProxyCheckImpersonateChromeBinary); os.IsNotExist(err) {
|
if config.ProxyCheckImpersonateChrome {
|
||||||
return nil, errors.New(fmt.Sprintf(`curl-impersonate-chrome binary does not exist: "%s"`, config.ProxyCheckImpersonateChromeBinary))
|
if _, err := os.Stat(config.ProxyCheckImpersonateChromeBinary); os.IsNotExist(err) {
|
||||||
|
return nil, errors.New(fmt.Sprintf(`curl-impersonate-chrome binary does not exist: "%s"`, config.ProxyCheckImpersonateChromeBinary))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cmd := exec.Command(config.ProxyCheckImpersonateChromeBinary, "--help")
|
cmd := exec.Command(config.ProxyCheckImpersonateChromeBinary, "--help")
|
||||||
err = cmd.Run()
|
err = cmd.Run()
|
||||||
|
|
Loading…
Reference in New Issue