set hubBranch to master if not provided in the configuration and if crowdsec has been built without version information (#884)

This commit is contained in:
blotus 2021-08-11 14:55:51 +02:00 committed by GitHub
parent 2a6369658a
commit 53f9837e6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,6 +90,7 @@ func setHubBranch() error {
cwhub.HubBranch = "master"
} else if csVersion == "" {
log.Warningf("Crowdsec version is '', using master branch for the hub")
cwhub.HubBranch = "master"
} else {
log.Warnf("Crowdsec is not the latest version. Current version is '%s' and the latest stable version is '%s'. Please update it!", csVersion, latest)
log.Warnf("As a result, you will not be able to use parsers/scenarios/collections added to Crowdsec Hub after CrowdSec %s", latest)