From 6794cbf4b66fe0a7469b9bdc3baee30117f39016 Mon Sep 17 00:00:00 2001 From: Ice3man543 Date: Mon, 22 Mar 2021 14:48:11 +0530 Subject: [PATCH] Bug fixes --- v2/internal/runner/runner.go | 2 +- v2/pkg/reporting/exporters/disk/disk.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/v2/internal/runner/runner.go b/v2/internal/runner/runner.go index 9a40d88b..efc1b4bc 100644 --- a/v2/internal/runner/runner.go +++ b/v2/internal/runner/runner.go @@ -76,7 +76,7 @@ func New(options *types.Options) (*Runner, error) { } reportingOptions = &reporting.Options{} - if parseErr := yaml.NewDecoder(file).Decode(options); parseErr != nil { + if parseErr := yaml.NewDecoder(file).Decode(reportingOptions); parseErr != nil { file.Close() gologger.Fatal().Msgf("Could not parse reporting config file: %s\n", parseErr) } diff --git a/v2/pkg/reporting/exporters/disk/disk.go b/v2/pkg/reporting/exporters/disk/disk.go index 9bb32291..35c1d25b 100644 --- a/v2/pkg/reporting/exporters/disk/disk.go +++ b/v2/pkg/reporting/exporters/disk/disk.go @@ -44,7 +44,7 @@ func (i *Exporter) Export(event *output.ResultEvent) error { filenameBuilder := &strings.Builder{} filenameBuilder.WriteString(event.TemplateID) filenameBuilder.WriteString("-") - filenameBuilder.WriteString(strings.ReplaceAll(event.Matched, "/", "_")) + filenameBuilder.WriteString(strings.ReplaceAll(strings.ReplaceAll(event.Matched, "/", "_"), ":", "_")) filenameBuilder.WriteString(".md") finalFilename := filenameBuilder.String()