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

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

Unable to run ginkgo bootstrap command on mac

问题

当我运行这个命令时

  1. ginkgo bootstrap

我得到了这个错误

  1. zsh: command not found: ginkgo

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

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

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

英文:

When I run this command

  1. ginkgo bootstrap

I am getting this error

  1. zsh: command not found: ginkgo

I have already installed ginkgo using the following command

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

I am unable to understand what I am doing wrong?

答案1

得分: 14

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

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

确保GO bin在你的PATH中:

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

现在尝试运行Ginkgo:

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

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

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

Make sure GO bin is in your PATH:

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

Now try to run Ginkgo:

  1. ginkgo bootstrap
  2. Generating ginkgo test suite bootstrap for temp in:
  3. 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:

确定