Skip to content

Commit

Permalink
fix for comma separated params for semp calls
Browse files Browse the repository at this point in the history
  • Loading branch information
LewisKSaint committed Sep 28, 2023
1 parent d6d3cab commit 0b56466
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/command/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, "/")
}
Expand Down Expand Up @@ -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, "/")
}
Expand Down

0 comments on commit 0b56466

Please sign in to comment.