Octo.exe escaping quotation marks from variables

When octo.exe submits variables it appears to stripping quotation marks from the value thats ultimately used by octopus server. In my case I’m trying to pass a json string and the value seen on the server is the value with no quotation marks.

-v “web-app-portal-config:{"AppSettings”:{"MailLinksRoot":"https://env-#{deploy-env}-#{deploy-name}-portal.azurewebsites.net/"}}"

As a work around i’ve been replacing " with " and fixing it in script on octopus.


Thanks for getting in touch and sorry to hear you’re having trouble with the variable values. To escape Json data you should use \ rather than `(back-tick).

For example,

--v "web-app-portal-config:{\"AppSettings\":{\"MailLinksRoot\":\"https://env-#{deploy-env}-#{deploy-name}-portal.azurewebsites.net/\"}}"

I noticed -v, with a single dash in your sample, I assume that was a paste error and you actually have --v?

We’ve had a look through our documentation on that parameter and we’ll update it shortly to include this information about Json formatting. Hope that helps and if I can assist further just let me know.


Thanks Shannon. I decided to just leave the " in and replace it on the server, it works :slight_smile: