How to Set a variable where the value is an array from the command line

I am trying to pass an array variable
fly set-pipeline varName=[test1,test2,test3]

This works and is parsed correctly when I use a params.yml like fly -set-pipeline
pipeline.yml -l params.yml
but when I try to pass it from the command line fly set-pipeline varName=[test1,test2,test3]

it thinks that the value is one big string and not an array.
Any suggestions on how I can overwrite the value from command line.

I tried wrapping it in double quotes and escaping but it doesn’t work.

Something like fly set-pipeline varName="[test1,test2,test3]" and
fl`y set-pipeline varName=[test1,test2,test3]\ but it didnt work.

Thanks

I think the --yaml-var flag on fly set-pipeline does what you want. --var assumes the value of the var is always a string.