From 0b5646694654195488fa6fa5f21bd428ee85eaa3 Mon Sep 17 00:00:00 2001 From: LewisKSaint Date: Thu, 28 Sep 2023 13:02:58 -0400 Subject: [PATCH] fix for comma separated params for semp calls --- cmd/command/util.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/command/util.go b/cmd/command/util.go index e71977ad..6e744c62 100644 --- a/cmd/command/util.go +++ b/cmd/command/util.go @@ -122,7 +122,8 @@ func ResolveSempPath(pathTemplate string, v string) (string, error) { } } - path := strings.ReplaceAll(generatedPath, ",", "") + path := strings.ReplaceAll(generatedPath, "/,,", "") + path = strings.ReplaceAll(path, "/,", "") if strings.HasSuffix(path, "/") { path = strings.TrimSuffix(path, "/") } @@ -152,7 +153,8 @@ func ResolveSempPathWithParent(pathTemplate string, parentValues map[string]any) generatedPath = strings.ReplaceAll(generatedPath, out[i][0], "") } - path := strings.ReplaceAll(generatedPath, ",", "") + path := strings.ReplaceAll(generatedPath, "/,,", "") + path = strings.ReplaceAll(path, "/,", "") if strings.HasSuffix(path, "/") { path = strings.TrimSuffix(path, "/") }