所以我正在编写一个 ant 构建文件,它将在 Cruisecontrol 中使用并遇到一个奇怪的问题。我已经用谷歌搜索了这个问题,但没有遇到任何具体的解决方案,所以我想我会在这里发布这个问题。
我有以下蚂蚁任务:
<target name="module.lint">
<apply executable="/usr/bin/php" failonerror="true">
<arg value="-l" />
<fileset dir="/path/to/my/elite/code" includes="**/*.php" />
</apply>
</target>
当我使用以下命令运行它时:
ant -buildfile /path/to/my/elite/buildfiles/project/elite/build.xml module.lint
它运行良好,但是当我尝试通过 CruiseControl GUI 构建项目时,出现以下错误:
[cc]Aug-09 15:51:04 ScriptRunner - fileset: Setup scanner in dir /path/to/my/elite/code with patternSet{ includes: [**/*.php] excludes: [] }
[cc]Aug-09 15:51:04 ScriptRunner - [apply] Executing '/usr/bin/php' with arguments:
[cc]Aug-09 15:51:04 ScriptRunner - [apply] '-l'
[cc]Aug-09 15:51:04 ScriptRunner - [apply] '/path/to/my/elite/code/Script.php'
[cc]Aug-09 15:51:04 ScriptRunner - [apply]
[cc]Aug-09 15:51:04 ScriptRunner - [apply] The ' characters around the executable and arguments are
[cc]Aug-09 15:51:04 ScriptRunner - [apply] not part of the command.
[cc]Aug-09 15:51:04 ScriptRunner - Execute:Java13CommandLauncher: Executing '/usr/bin/php' with arguments:
[cc]Aug-09 15:51:04 ScriptRunner - '-l'
[cc]Aug-09 15:51:04 ScriptRunner - '/path/to/my/elite/code/Script.php'
[cc]Aug-09 15:51:04 ScriptRunner -
[cc]Aug-09 15:51:04 ScriptRunner - The ' characters around the executable and arguments are
[cc]Aug-09 15:51:04 ScriptRunner - not part of the command.
[cc]Aug-09 15:51:04 ScriptRunner - [apply] No syntax errors detected in /path/to/my/elite/code/Script.php
不知道为什么我会收到“字符......不是命令的一部分”错误,尽管看起来 lint 检查确实执行了。
我需要做什么来修复“字符......不是命令的一部分”错误?