teamcity如何处理包含“%"的配置参数 [英] teamcity how to handle configuration parameters which contains "%"
问题描述
例如,我需要传递一个值为abc%123"的配置参数,但是当我输入这些值时,它总是abc123",即使我遵循了http://confluence.jetbrains.com/display/TCD8/Defining+and+Using+构建+参数+输入+构建+配置将值更改为abc%%123",回显的值仍然是abc123".我使用teamcity 8.0.4.有没有人知道如何解决这个问题?
for example, I need to pass a configuration paramters whose value is "abc%123", but when I encho the values, it is always "abc123", even I followed http://confluence.jetbrains.com/display/TCD8/Defining+and+Using+Build+Parameters+in+Build+Configuration change the value to "abc%%123", the value echoed is still "abc123". I use the teamcity 8.0.4. Does any body hear know how to solve this issue?
推荐答案
输入参数值时,必须用 %% 对 % 进行转义,即 abc%%123 而不是 abc%123.查看在 TeamCity 构建脚本中使用百分号了解更多信息深入讨论.
When you enter the parameter value, you must escape the % with %%, i.e. abc%%123 instead of abc%123. Check out Using the percent sign in TeamCity build scripts for more in depth discussion.
这篇关于teamcity如何处理包含“%"的配置参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!