don't check for chrome binary binary when impersonate is disabled

This commit is contained in:
Cyberes 2024-07-29 16:36:54 -06:00
parent bffd709c41
commit f85048c016
1 changed files with 4 additions and 2 deletions

View File

@ -95,9 +95,11 @@ 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))
}
}
cmd := exec.Command(config.ProxyCheckImpersonateChromeBinary, "--help")
err = cmd.Run()
if err != nil {