don't check for chrome binary binary when impersonate is disabled
This commit is contained in:
parent
bffd709c41
commit
3f27ceff89
|
@ -95,6 +95,7 @@ func SetConfig(configFile string) (*Config, error) {
|
|||
return nil, proxyPoolThirdpartyErr
|
||||
}
|
||||
|
||||
if config.ProxyCheckImpersonateChrome {
|
||||
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))
|
||||
}
|
||||
|
@ -103,6 +104,7 @@ func SetConfig(configFile string) (*Config, error) {
|
|||
if err != nil {
|
||||
return nil, errors.New(fmt.Sprintf(`curl-impersonate-chrome binary failed to run: %s`, err))
|
||||
}
|
||||
}
|
||||
|
||||
cfg = config
|
||||
return config, nil
|
||||
|
|
Loading…
Reference in New Issue