I'm trying to create a global variable called BUILD_NAME by passing parameters to command line from 3rd party software (TeamCity). Some TeamCity variables can contain whitespace. In the example below %TC_BUILD_NAME% gets the value "My Build Name".
pybot --variable BUILD_NAME:%TC_BUILD_NAME% C:/tests.txt ---> pybot --variable BUILD_NAME:My Build Name C:/tests.txt
This obviously doesn't work because there are spaces in the variable name. I looked into
Robot Framework Guide: Escaping Complicated Characters but I'm probably misunderstanding how escaping is supposed to work. I tried to do something like this to replace whitespace with underscores:
pybot --escape space:_ --variable BUILD_NAME:%TC_BUILD_NAME% C:/tests.txt
But the above doesn't work as I would expect. %TC_BUILD_NAME% is still rendered as "My Build Name", with whitespace.