Skip to content
This repository has been archived by the owner on Apr 10, 2019. It is now read-only.

Split environment variable setup #320

Merged
merged 2 commits into from
Jul 14, 2017

Conversation

dnephin
Copy link
Collaborator

@dnephin dnephin commented Jul 12, 2017

Environment variables are setup for two cases: run and install.

I believe that each case requires different variables. Run only requires PATH to be set correctly. Install requires GOBIN and GOPATH to be set correctly.

This change splits configureEnvironment() into two functions. One for run, and one for "install vendored linters". This skips any unnecessary os.Setenv() and makes it more obvious which variables are used for which case. Any overlap between these cases should still be shared using extracted functions.

main.go Outdated
for _, path := range paths {
if p == path {
if path == path {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not correct.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, yes. Fixed

dnephin added 2 commits July 13, 2017 10:46
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants