Skip to content

Commit

Permalink
ci: Handle job names with colons in filterJobArg()
Browse files Browse the repository at this point in the history
When splitting an argument into branch and job name, we assume that
the string only contains a single ':'. It's a legal character in
job names though, so handle that edge case by limiting the number
of substrings.
  • Loading branch information
fmuellner committed Dec 20, 2020
1 parent fd00962 commit cd3bfec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/ci_trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func filterJobArg(args []string) (string, []string, error) {
}

if strings.Contains(jobName, ":") {
ps := strings.Split(jobName, ":")
ps := strings.SplitN(jobName, ":", 2)
branchArgs = append(branchArgs, ps[0])
jobName = ps[1]
}
Expand Down

0 comments on commit cd3bfec

Please sign in to comment.