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

🌱 make install was not installing to GOPATH #1261

Merged
merged 1 commit into from
Nov 14, 2021

Conversation

ristomcgehee
Copy link
Contributor

  • Please check if the PR fulfills these requirements
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    Tooling bug fix

  • What is the current behavior? (You can also link to an open issue here)
    I have my GOPATH set to a different location:

~/code/ossf/scorecard(main)$ echo $GOPATH
/home/chris/.go

The line

GOPATH := $(go env GOPATH)

appears to be overwriting my environment variable and turning it into a local variable. If I modify the install target to:

.PHONY: install
install: ## Installs all dependencies needed to compile Scorecard
install: | $(PROTOC)
	@echo Installing tools from tools/tools.go
	echo $$GOPATH
	go env GOPATH
	cd tools; cat tools.go | grep _ | awk -F'"' '{print $$2}' | xargs -tI % go install %

It outputs:

~/code/ossf/scorecard(main)$ make install
Installing tools from tools/tools.go
echo $GOPATH

go env GOPATH
/home/chris/go
cd tools; cat tools.go | grep _ | awk -F'"' '{print $2}' | xargs -tI % go install %
...

This causes the tools to be installed in /home/chris/go which is not in my $PATH.

  • What is the new behavior (if this is a feature change)?
    I checked with Naveen who added this line in 🌱 Move tool dependencies into go.mod #460, and he thought it would be fine to remove this line.

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
    No

Copy link
Member

@naveensrinivasan naveensrinivasan left a comment

Choose a reason for hiding this comment

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

Thanks @chrismcgehee!

@naveensrinivasan naveensrinivasan merged commit 16cd53d into ossf:main Nov 14, 2021
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.

2 participants