travis go error 'The command “eval go get -t -v ./…” failed'

♀尐吖头ヾ 提交于 2020-01-03 14:18:18

问题


I have a pretty straightforward setup.. - a Travis.yml file : https://github.com/openassistive/OpenATFrontEnd/blob/master/.travis.yml

which has this line:

before_script:
   - go get -u -v github.com/spf13/hugo

but it fails - with

The command "eval go get -t -v ./..." failed. Retrying, 2 of 3.

(https://travis-ci.org/openassistive/OpenATFrontEnd/builds/166105574) I can't figure it out. I see the language is set correctly - and looking at other SO posts the version number is correct. Is there a different version I should be using?


回答1:


Read this, the go get .... is part of the default go build script on travis, if no makefile is found.

A simple solution may be to add a Makefile with an empty recipe

$ cat Makefile
target: ;
$ make && echo "ok"
make: « target » uptodate.
ok

So travis will set the default install step to true, which should avoid the got get



来源:https://stackoverflow.com/questions/39937224/travis-go-error-the-command-eval-go-get-t-v-failed

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!