【发布时间】:2013-12-13 04:51:15
【问题描述】:
我有这个 ANT 任务在 Eclipse 项目中执行 Sass:
<project basedir="." default="sass">
<target name="sass">
<apply dest="www/styles" executable="sass">
<srcfile/>
<targetfile/>
<fileset dir="styles" includes="*.scss"/>
<mapper from="*.scss" to="*.css" type="glob"/>
</apply>
</target>
</project>
它在 Ubuntu 中运行良好。在 Windows 7 中,我必须将可执行文件设置为 sass.bat。
这是错误:
Buildfile: D:\my_workspace\my_project\build.xml
sass:
BUILD FAILED
D:\my_workspace\my_project\build.xml:3: Execute failed: java.io.IOException:
Cannot run program "sass" (in directory "D:\my_workspace\my_project"):
CreateProcess error=2, The system cannot find the file specified
Total time: 326 milliseconds
sass 和 sass.bat 都可以从命令行调用,因此 Ruby/bin 文件夹位于系统 PATH 变量中。
我不想为不同的操作系统维护这个文件的两个版本。
我该如何解决这个问题?
【问题讨论】:
标签: ruby eclipse batch-file ant sass