我们使用Ant的安全处理程序来输入密码:
<input message="Please enter TFS password: " addproperty="tfs.password">
<handler type="secure"/>
</input>
当然,这是可行的:输入不打印。
然而,当(保存构建日志)我们以运行构建时
ant | tee build.log
输入以明文打印。哎呀。
我想知道问题在哪里(蚂蚁?tee?)以及如何解决。
p.S.OS:
Linux devosb1 3.0.0-12-generic #20-Ubuntu
SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
p.p.S.好吧,所以它不是tee——用read/echo代替tee的shell脚本会触发同样的行为。
看起来像是一个shell问题。您是否考虑过使用ANT记录任务?
<project name="demo" default="build">
<target name="build">
<record name="build.log" loglevel="verbose"/>
<input message="Please enter TFS password: " addproperty="tfs.password">
<handler type="secure"/>
</input>
</target>
</project>