简体   繁体   English

Jenkins执行外壳转义—字符

[英]Jenkins execute shell is escaping — characters

I am trying to run following command from executable shell task: 我正在尝试从可执行Shell任务运行以下命令:

rhc configure-app -a TestProject20140324192518 -–deployment-type binary

But when I run the jenkins job, it converts the command to: 但是,当我运行詹金斯工作时,它将命令转换为:

rhc configure-app -a TestProject20140324192518 $'-\342\200\223deployment-type' binary

Do I need to escape -- here ? 我需要逃脱吗?

If I put above command in .sh, it runs just fine. 如果我在.sh中放置上述命令,它会正常运行。

That doesn't look like a hyphen - did you copy the command from somewhere? 看起来不像连字符-您是否从某处复制了命令?

Instead of: 代替:

rhc configure-app -a TestProject20140324192518 -–deployment-type binary

Try: 尝试:

rhc configure-app -a TestProject20140324192518 --deployment-type binary

Note that the character immediately before "deployment-type" has been changed. 请注意,“部署类型”之前的字符已更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM