无法在 Mac 上运行 ginkgo bootstrap 命令。

huangapple go评论94阅读模式
英文:

Unable to run ginkgo bootstrap command on mac

问题

当我运行这个命令时

ginkgo bootstrap 

我得到了这个错误

zsh: command not found: ginkgo 

我已经使用以下命令安装了ginkgo

go get -u github.com/onsi/ginkgo/ginkgo 

我无法理解我做错了什么?

英文:

When I run this command

ginkgo bootstrap 

I am getting this error

zsh: command not found: ginkgo 

I have already installed ginkgo using the following command

go get -u github.com/onsi/ginkgo/ginkgo 

I am unable to understand what I am doing wrong?

答案1

得分: 14

根据这里的说明安装Ginkgo,例如最新版本:

go env -w GO111MODULE=on
go install github.com/onsi/ginkgo/v2/ginkgo@latest
go get github.com/onsi/gomega/...

确保GO bin在你的PATH中:

go env GOPATH # /home/user/go
export PATH=$PATH:$(go env GOPATH)/bin

现在尝试运行Ginkgo:

ginkgo bootstrap
Generating ginkgo test suite bootstrap for temp in:
    temp_suite_test.go
英文:

After installing Ginkgo as described here, for example the latest version:

go env -w GO111MODULE=on
go install github.com/onsi/ginkgo/v2/ginkgo@latest
go get github.com/onsi/gomega/...

Make sure GO bin is in your PATH:

go env GOPATH # /home/user/go
export PATH=$PATH:$(go env GOPATH)/bin

Now try to run Ginkgo:

ginkgo bootstrap
Generating ginkgo test suite bootstrap for temp in:
	temp_suite_test.go

huangapple
  • 本文由 发表于 2022年1月27日 19:44:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/70878013.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定