From 26bf3808fe9e9715a5a9984a1a945017db7acd77 Mon Sep 17 00:00:00 2001 From: Christian Volk Date: Wed, 23 Mar 2022 11:45:05 +0100 Subject: [PATCH] chore(checkmarxExecuteScan): split and trim filterPattern (#3661) --- cmd/checkmarxExecuteScan.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/checkmarxExecuteScan.go b/cmd/checkmarxExecuteScan.go index c782431c5..0ff345f82 100644 --- a/cmd/checkmarxExecuteScan.go +++ b/cmd/checkmarxExecuteScan.go @@ -226,7 +226,7 @@ func loadExistingProject(sys checkmarx.System, initialProjectName, pullRequestNa func zipWorkspaceFiles(filterPattern string, utils checkmarxExecuteScanUtils) (*os.File, error) { zipFileName := filepath.Join(utils.GetWorkspace(), "workspace.zip") - patterns := strings.Split(strings.ReplaceAll(strings.ReplaceAll(filterPattern, ", ", ","), " ,", ","), ",") + patterns := piperutils.Trim(strings.Split(filterPattern, ",")) sort.Strings(patterns) zipFile, err := os.Create(zipFileName) if err != nil {