Build failed running pavement.compile: Subprocess return code: -1
如果我们执行 paver lint 命令,则错误信息如下:
E:\Projects\treesaver>paver lint
git describe --abbrev=0
git describe --long --tags
---> pavement.lint
makedirs E:\Projects\treesaver\.tmp (mode 511)
gjslint E:\Projects\treesaver\src\core.js
1 files checked, no errors found.
gjslint E:\Projects\treesaver\src\init.js
----- FILE : E:\Projects\treesaver\src\init.js -----
Line 33, E:0214: Missing description in @define tag
Found 1 errors, including 0 new errors, in 1 files (0 files OK).
Some of the errors reported by GJsLint may be auto-fixable using the script
fixjsstyle. Please double check any changes it makes and report any bugs. The
script can be run by executing:
fixjsstyle E:\Projects\treesaver\src\init.js
Captured Task Output:
---------------------
---> pavement.lint
makedirs E:\Projects\treesaver\.tmp (mode 511)
gjslint E:\Projects\treesaver\src\core.js
gjslint E:\Projects\treesaver\src\init.js
Build failed running pavement.lint: Subprocess return code: 1
从上面可以看出,我们在执行下面这个命令时,有错误发生,单独执行这个命令:
gjslint E:\Projects\treesaver\src\init.js ,报的错误信息如下:
E:\Projects\treesaver>gjslint E:\Projects\treesaver\src\init.js
----- FILE : E:\Projects\treesaver\src\init.js -----
Line 33, E:0214: Missing description in @define tag
Found 1 errors, including 0 new errors, in 1 files (0 files OK).
Some of the errors reported by GJsLint may be auto-fixable using the script
fixjsstyle. Please double check any changes it makes and report any bugs. The
script can be run by executing:
fixjsstyle E:\Projects\treesaver\src\init.js
报错误:Subprocess return code ×× 是下面Paver 的easy.py 脚本的 sh 函数抛出的。
http://code.google.com/p/paver/source/browse/trunk/paver/easy.py?r=93
出现这个问题的原因在于:treeview 的Paver 命令 pavement.py 是基于 linux 编写的。
其中用到了一些 linux 特有的命令和判断
比如:
def prepend_mustache(filename): 函数中出现了下面命令
sh('mv %s %s && mv %s %s && cat %s >> %s && rm %s' % (
(filename),
(tmp_name),
'build/mustache.js',
(filename),
(tmp_name),
(filename),
(tmp_name)
))
mv,rm 是 linux 下特有的操作命令,显然win下不能用。
又比如: def get_dependency_list(js_files): 函数
有如下的判断:
if not line or line[0] != '/' or line in found:
continue
第一个字符是 / 开始的,这是 linux 才有的文件结构,
如果要把这一行修改为 win 可用,需要修改成
if not line or line in found or not os.path.isfile(line):
continue
小结:
TreeSaver 的编译,目前脚本是基于 linux 编写的,你如果要编译,除非你修改 pavement.py 文件,否则你还是搭配一台 linux 电脑吧。