Chocolatey 等待命令完成超时。[流星]

Ank*_*oni 3 meteor chocolatey

只是为了试用,我使用 Chocolatey 安装了 Meteor 1.6。

当我运行命令“choco installmeteor”时,过了一会儿,我收到以下错误

Downloading meteor 64 bit
  from 'https://packages.meteor.com/bootstrap-link?arch=os.windows.x86_64'
Progress: 48% - Saving 83.27 MB of 171.74 MB                                   C
hocolatey timed out waiting for the command to finish. The timeout
 specified (or the default value) was '2700' seconds. Perhaps try a
 higher `--execution-timeout`? See `choco -h` for details.
The install of meteor was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\meteor\tools\chocolateyinstal
l.ps1'.
 See log for details.

Chocolatey installed 1/2 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures
 - meteor (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\meteo
r\tools\chocolateyinstall.ps1'.
 See log for details.
Run Code Online (Sandbox Code Playgroud)

Gar*_*ark 7

默认情况下,Chocolatey 的命令超时时间为 45 分钟(2700 秒),如下所述:

https://chocolatey.org/docs/chocolatey-configuration#general

下载流星安装程序是否需要比这更长的时间?

如果是这样,您可以使用与此类似的命令更改该值:

choco config set --name <nameFromBelow> --value <value>
Run Code Online (Sandbox Code Playgroud)

即在您的情况下(再次作为示例):

choco config set --name commandExecutionTimeoutSeconds --value 5400
Run Code Online (Sandbox Code Playgroud)

或者,如果您只想将此超时应用于单个命令,您可以尝试:

choco install meteor --execution-timeout 5400
Run Code Online (Sandbox Code Playgroud)

如错误输出中所述。