我正在尝试使用Git shell从Git在我的Windows PC上构建一个存储库。 存储库的名称是“ newrep ”。
当我输入“ ant ”命令时,它会抛出以下错误 -
The term ant is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a patch was included, verify that the path is correct and try again.
At line: 1 char :4
+ ant <<<< + CategoryInfo :ObjectNotFound: (ant:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
如何解决此错误?
答案 0 :(得分:0)
我有一个bat文件,用于设置ANT_HOME
并打印ant -version
输出。
从bat
执行此powershell
文件后,如果我输入"ant -version"
,我会收到与上述相同的错误。
但是,如果我将"ant all"
命令添加到同一个bat文件中,并且再次执行bat文件,则command prompt
命令执行没有任何问题。
所以我从中理解的是,与powershell
不同,{{1}}不会设置本地会话属性。