【发布时间】:2015-05-12 06:16:34
【问题描述】:
我刚刚在我的一个构建服务器(Win Server 2008 R2)上安装了 nodejs,它承载了一个 Bamboo 远程代理。完成安装并重新启动后,我陷入了以下情况:
远程 Bamboo 构建代理作为 Windows 服务运行,用户为 MyDomain\MyUser。当执行带有内联 powershell 任务的构建时,它会失败并出现错误(来自构建代理日志):
com.atlassian.utils.process.ProcessNotStartedException: powershell could not be started
...
java.io.IOException: Cannot run program "powershell"
...
java.io.IOException: CreateProcess error=2, The system cannot find the file specified
以 MyDomain\MyUser 身份登录服务器,我检查了 powershell 是否在路径中:
where powershell
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
我已尝试重新启动服务并多次重新启动机器。没有运气。唯一可行的是,如果我将脚本作为具有 powershell 绝对路径的 bat 文件执行 - 但我不希望这样。
我已经搜索了这方面的解决方案,但即使这个似乎相关:Hudson cannot find powershell after update to powershell 3 - 建议的解决方案不起作用。
我在这里错过了什么?
【问题讨论】:
标签: windows node.js powershell continuous-integration bamboo