Octo command Unrecognized command arguments: error message


I’m trying to pass the below variable through Octo command and I’m getting Unrecognized command arguments: error message
–variable ‘BrandList:[“Activate - xx”,“Activate - yy”,“Activate - zz”]’

I see in http://help.octopusdeploy.com/discussions/problems/34545-octoexe-release-notes-escaping that there is an issue with double quotes. Do you now have a solution to this for passing variable values?

btw, I’m using version 4.15.6 OctopusTool


Hi Binh,

Thanks for getting in touch. I believe the error message you are seeing relates to the --variable itself, I can’t find any of our commands that would accept that as a parameter, thus it would be treated as an Unrecognized command argument.

To help troubleshoot, could I get some more details on your build and deployment scenario? Where are you trying to get the variable value to?


Hi again Binh,

My apologies, I’ve located how the variable argument gets passed and processed in the deployment commands.

I believe that all you are actually missing is the correct escaping on the double quotes.

--variable "BrandList:[\"Activate - xx\",\"Activate - yy\",\"Activate - zz\"]"

Looks like it’s pushing the correct value through in my test setup. Noting that the value itself is surrounded by double quotes. In your original example you had single quotes, which will not work.


That fixed the issue