bash外壳上的Linux引号:EXEC ARGS(值)由Ant脚本
./mimic_cmd "startDaemon()"
通讯蚂蚁代码:
<exec failonerror="true" executable="/bin/mimic_cmd">
<arg value='"startDaemon()"' />
</exec>
- 是否蚂蚁代码恰好在bash中表示上述命令贝壳?根据调试信息,它看起来像它:
[exec] Executing '/bin/mimic_cmd' with arguments: [exec] '"startDaemon()"' [exec] [exec] The ' characters around the executable and arguments are [exec] not part of the command. Execute:Java13CommandLauncher: Executing '/bin/mimic_cmd' with arguments: '"startDaemon()"' The ' characters around the executable and arguments are not part of the command.
然而,1,而在Bash shell命令返回0
绷vmlauncher没有按蚂蚁的代码返回和退出代码没有帮助,路径都是正确的。
相同的蚂蚁代码适用于Windows与生成的调试输出:
[exec] Executing 'C:\bin\mimic_cmd' with arguments: [exec] '"startDaemon()"' [exec] [exec] The ' characters around the executable and arguments are [exec] not part of the command. Execute:Java13CommandLauncher: Executing 'C:\bin\mimic_cmd' with arguments: '"startDaemon()"' The ' characters around the executable and arguments are not part of the command.
mimic_cmd是跨平台安装解决方案的shell可执行文件。我不参与开发它的内部团队,所以老实说,我不能说是否总是需要引号,但有些命令似乎需要它们,或者在括号之前必须有一个空格? 'mimic_cmd StartDaemon()'在ANT和命令行(不包括引号,空格)中不起作用 'mimic_cmd createNewWorkspace(blah)'不带引号根本不起作用; ''“mimic_cmd createNewWorkspace(blah)”'在Windows上运行,但不能运行在linux上,'mimic_cmd createNewWorkSpace(blah)'同时运行在...(括号之前的空格) – Michael 2010-03-04 00:24:33
嗯......小心那些不带引号* nix,他们可能正在做一些背后的事情,你不希望......输入'/ bin/mimic_cmd“createNewWorkspace(blah)”'在* nix命令行上工作吗?如果是这样的话,那么在ANT中''exec failonerror =“true”executable =“/ bin/mimic_cmd”>“如果'blah'本身就是一个字符串,它会变得更有趣:'/ bin/mimic_cmd“createNewWorkspace(\”blah \“)”'或'/ bin/mimic_cmd'createNewWorkspace(“blah”)'' ,在ANT中,'... ...' –
vladr
2010-03-04 00:48:27