Merge pull request #274 from vzamanillo/update-err-fix

Fixed error reporting on update templates
dev
bauthard 2020-09-01 02:08:46 +05:30 committed by GitHub
commit 2e81db31ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ func New(options *Options) (*Runner, error) {
}
if err := runner.updateTemplates(); err != nil {
gologger.Warningf("Could not update templates: %s\n", err)
gologger.Labelf("Could not update templates: %s\n", err)
}
if options.TemplateList {

View File

@ -118,13 +118,13 @@ func (r *Runner) updateTemplates() error {
}
if version.EQ(oldVersion) {
gologger.Labelf("Latest version of nuclei-templates installed: v%s\n", oldVersion.String())
gologger.Infof("Your nuclei-templates are up to date: v%s\n", oldVersion.String())
return r.writeConfiguration(r.templatesConfig)
}
if version.GT(oldVersion) {
if !r.options.UpdateTemplates {
gologger.Labelf("You're using outdated nuclei-templates. Latest v%s\n", version.String())
gologger.Labelf("Your current nuclei-templates v%s are outdated. Latest is v%s\n", oldVersion, version.String())
return r.writeConfiguration(r.templatesConfig)
}