Skip to content

zsh: command not found: go-junit-report #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Parthiba-Hazra opened this issue Mar 14, 2023 · 5 comments
Open

zsh: command not found: go-junit-report #160

Parthiba-Hazra opened this issue Mar 14, 2023 · 5 comments

Comments

@Parthiba-Hazra
Copy link

Ran the command - go install github.com/jstemmer/go-junit-report/v2@latest
test go-junit-report - go test -v 2>&1 ./... | go-junit-report -set-exit-code > report.xml
output - zsh: command not found: go-junit-report
I think I had to add some path in .zshrc file, but I cant understand what to add..
Screenshot from 2023-03-14 11-33-04

@LRipi
Copy link

LRipi commented Mar 15, 2023

What is your GOPATH? (i.e. go env GOPATH)
Can you the binary in it?

@Parthiba-Hazra
Copy link
Author

What is your GOPATH? (i.e. go env GOPATH) Can you the binary in it?

GOPATH - /home/username/go

@qmilangowin
Copy link

Getting this too now.
Was working before. Now getting:
/bin/bash: go-junit-report: command not found

junit-report is installed in my go/bin directory

@joschi
Copy link

joschi commented Jun 28, 2024

GOPATH - /home/username/go

junit-report is installed in my go/bin directory

Is $GOPATH/bin part of your $PATH environment variable?

@PaulKnauer
Copy link

I am using go-junit-report in my GitLab CI/CD pipeline.

I got the same problem when I upgraded my golang docker version image to golang:1.24

After some troubleshooting I noticed that the binary is not getting placed into the GOPATH.
I injected a find to see where it was being placed, here is the output of that:

$ go get -u github.com/jstemmer/go-junit-report/v2@latest
go: downloading github.com/jstemmer/go-junit-report v1.0.0
go: downloading github.com/jstemmer/go-junit-report/v2 v2.1.0
go: added github.com/jstemmer/go-junit-report/v2 v2.1.0
$ find / -name go-junit-report
/go/pkg/mod/github.com/jstemmer/go-junit-report
/go/pkg/mod/cache/download/github.com/jstemmer/go-junit-report
/go/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/github.com/jstemmer/go-junit-report

The paths listed by find above all point to directories, with no sign of the binary anywhere.

Any help would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants