TfsExtensions icon indicating copy to clipboard operation
TfsExtensions copied to clipboard

Template parameter value containing comma ',' adds space after it

Open CaffreyYA opened this issue 10 months ago • 1 comments

Hi, I have a pipeline that uses TriggerBuild@4 to trigger another pipeline, and I have it to send something like templateParameters: 'Foo:$Var'

And in some cases, $Var would contain comma, so it could be Foo:"A,B", but then on the receiver pipeline side, it gets "A, B" as the value of Foo parameter, instead of "A,B". And in our case, "A,B" and "A, B" are treated differently, so this is not working well because from the receiver side, it only gets "A, B" and it doesn't know if the original value contains the space or not.

I found this post from years back: https://github.com/huserben/TfsExtensions/issues/54 and it looks like

BuildConfiguration: chk,ret,BuildPlatform: x86,amd64,FileSpecification: CompilerAndLibraries

becomes

BuildConfiguration: chk, ret BuildPlatform: x86, amd64 FileSpecification: CompilerAndLibraries

is what introduced space whenever seeing a comma. I'm wondering if it could remove the space, if the original value does not contain it? So it becomes:

BuildConfiguration: chk,ret BuildPlatform: x86,amd64 FileSpecification: CompilerAndLibraries

CaffreyYA avatar Apr 26 '24 00:04 CaffreyYA