调用ant exec命令时未找到文件错误
我有从ant文件调用“Cypress”的简单代码 1) 我已经在path env中配置了cypress路径 2) 我可以从命令提示符的任何位置启动cypress命令调用ant exec命令时未找到文件错误,ant,exec,Ant,Exec,我有从ant文件调用“Cypress”的简单代码 1) 我已经在path env中配置了cypress路径 2) 我可以从命令提示符的任何位置启动cypress命令 <exec executable="cypress" dir="C:\rockwell\CypressAutomation\node_modules\.bin\cypress"> </exec> 上面的代码给出了一个错误:JAva.io.exception;
<exec executable="cypress"
dir="C:\rockwell\CypressAutomation\node_modules\.bin\cypress">
</exec>
上面的代码给出了一个错误:JAva.io.exception;在目录“C:\rockwell\CypressAutomation\node\u modules.bin”中找不到cypress
我也试过,没有“dir”属性;导致相同的错误。只要它包含在系统路径中,它就应该可以工作,因此可能有一些小细节(打字错误、缺少大写字母、缺少文件扩展名等)把它搞乱了。如果做不到这一点,您可以将文件的完整路径放在
executable
属性中,而完全不依赖路径;它给了我不同的错误;“CreateProcess error=193,%1不是有效的Win32应用程序”通过将扩展名添加到命令.cmd来修复它