Skip to content
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

Fix condition for GOPATH output #221

Merged
merged 1 commit into from Apr 19, 2022

Conversation

vsafonkin
Copy link

Description:
At the moment setup-go action has logic to create directory and add it in the runner PATH if the go env GOPATH command has path in output. There is no path in command output for go version < 1.7 but this command returns single byte so the condition to check go env GOPATH output is true for any go versions.
For example
go 1.5:

Screenshot 2022-04-17 at 5 55 06 PM

go 1.18:

Screenshot 2022-04-17 at 5 57 51 PM

This logic caused an error but it did not interrupt action on node 12 (action v2 version):

Screenshot 2022-04-17 at 6 06 48 PM

Successful run with error for go 1.5 on action v2 version: https://github.com/vsafonkin/test-repo/runs/6054892779?check_suite_focus=true#logs

After action update to node 16 (action v3 version) this error breaks the action execution.

Fixed the condition for go env PATH output.
Test run with go 1.18: https://github.com/vsafonkin/test-repo/actions/runs/2180363887
Test run with go 1.5: https://github.com/vsafonkin/test-repo/actions/runs/2180366207

Related issue:
#216

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@vsafonkin vsafonkin requested a review from a team April 17, 2022 16:16
@vsafonkin vsafonkin merged commit 46eabca into actions:main Apr 19, 2022
@vsafonkin vsafonkin deleted the v-vsafonkin/fix-gopath-condition branch April 19, 2022 06:58
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

Successfully merging this pull request may close these issues.

None yet

3 participants