-
Notifications
You must be signed in to change notification settings - Fork 562
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature request: add GOBIN to PATH even if a version isn't installed #49
Comments
@ydnar I tried now with new version (setup-go@v2), and apparently it's adding GOBIN to PATH, working well at my repository. |
Did you specify |
I had the same issue, after running Edit: looks like go mod download does not put binaries in GOBIN |
Seems like using this one-liner |
@subins2000 adding that one liner (setup-go@v2) does add gobin to the path. Just tried. Look at the path step in this run. The second entry of the path in this example has |
@bryanmacfarlane It didn't work for me on a Windows host and bash, so had to do :
The above is deprecated in the latest images. Using this now :
|
I'll try it out on windows. The code is adding it to the path (it actually does your second line of add-path - even on windows). Note it does not set GOPATH as that's a < go 1.12 and pre go modules concept. If that's your use case, you can set. It also doesn't set GOBIN (but go/bin is added to path). do we think it should? |
In my builds this yml is not resulting in GOBIN being in the PATH. If I go get tools they install fine but aren't available on the PATH. This is a snippet from my workflow: name: build
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
- uses: actions/setup-ruby@v1
- run: go get github.com/mattn/goreman
- run: goreman ... This is what I see if I echo PATH:
|
@bryanmacfarlane I'm not sure how it works for you, because in your output there is the line Lines 23 to 31 in d0c5def
|
I've opened a PR #89 that adds GOBIN to PATH regardless of whether a version is specified. I tested it on my own repo and it worked in both cases. |
Hi @ydnar ! Sorry for the late response! |
Honestly, I haven’t checked. All of our uses of - name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ^1 |
@Sergey-Murtazin PR with a fix is open at #89. |
Hello everyone. We added this logic in new major action version. For now I'm going to close the issue. If you have any concerns feel free to ping us. |
Request: setup-go should always add GOBIN to PATH, even if it uses the default Go installed in the environment. This would mirror how it always sets up Go matchers.
Per thread here: #39 (comment)
Thanks!
The text was updated successfully, but these errors were encountered: