Skip to content

Commit

Permalink
fix: Set $PATH so defaults are last
Browse files Browse the repository at this point in the history
This is generally considered good practice, so your newly-installed Go
bins can override similarly-named bins that come with the OS.
  • Loading branch information
jeffbyrnes committed Jul 1, 2020
1 parent 213fb6c commit 3e40918
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -22,6 +22,7 @@ This file is used to list changes made in each version of golang.
- Clean up unnecessary env vars from source build
- Build from source per [official Go docs](https://golang.org/doc/install/source)
- Use native resources instead of shell commands when building from source
- Set `$PATH` in `golang.sh` so that the existing values are last, per general practice

## 3.0.0

Expand Down
2 changes: 1 addition & 1 deletion templates/default/golang.sh.erb
@@ -1,3 +1,3 @@
export PATH=$PATH:<%= node['golang']['install_dir'] %>/go/bin:<%= node['golang']['gobin'] %>
export PATH="<%= node['golang']['install_dir'] %>/go/bin:<%= node['golang']['gobin'] %>:$PATH"
export GOPATH=<%= node['golang']['gopath'] %>
export GOBIN=<%= node['golang']['gobin'] %>

0 comments on commit 3e40918

Please sign in to comment.