【发布时间】:2023-11-14 15:30:01
【问题描述】:
我正在尝试在 cygwin 中的 Windows XP Hudson 从站上执行脚本。这是在 Hudson 中配置的 shell 命令:
#!C:\cygwin\bin\bash.exe
echo "hello"
在 windows 机器上启动 cygwin 似乎有问题,我收到了这个错误:
2 [main] bash 2692 C:\cygwin\bin\bash.exe: *** fatal error - C:\cygwin\bin\bash.exe:
*** internal error reading the windows environment - too many environment variables?
那么有没有其他人经历过这种情况,以及关于如何让脚本运行的任何想法?
【问题讨论】:
-
如果删除 shebang 行会怎样?
#!C:\....?我不记得 cygwin 在那里接受反斜杠,但我已经有一段时间没有想到了...... -
FWIW,您所描述的内容适用于我使用 Execute shell 构建步骤(但不是 Execute Windows 批处理命令)。
-
@JimR:我尝试删除 shebang 行,但它不知道 bash 可执行文件在哪里运行 bash 脚本。所以看起来它可以用windows的东西来解释反斜杠。 (我的shebang线就像这里的一样:wiki.hudson-ci.org/display/HUDSON/Shells
-
@Dave Bacher:我在执行 shell 构建步骤中确实有这个,我想知道是否存在版本问题。我正在运行 cygwin 1.5.21 和 Hudson 1.3.82,你在运行什么?
-
我在 cygwin 1.5.21-2 和 Hudson 1.388 上。由于历史原因(我不记得了),我让我的 Windows+cygwin 构建运行一个调用
\cygwin\bin\bash -c "my_build_script param param param"的 Windows 批处理命令
标签: windows scripting hudson cygwin