I'm stumped. I have a little make file:
GO ?= $(shell which go 2>/dev/null)
GOEXT_TMP_DIR := $(shell pwd -P)/tmp
.PHONY: test
test:
export GOPATH=$(GOEXT_TMP_DIR) && \
$(GO) get -u <http://github.com/securego/gosec/cmd/gosec|github.com/securego/gosec/cmd/gosec>
This
go get command is supposed to get the source files for this
gosec tool, build it and install the binary to $GOPATH/bin. It works fine:
romulus:cicd-test cbarlock$ make -f test.mak
export GOPATH=/Users/cbarlock/vscode/cicd-test/tmp && \
/usr/local/go/bin/go get -u <http://github.com/securego/gosec/cmd/gosec|github.com/securego/gosec/cmd/gosec>
romulus:cicd-test cbarlock$ ls tmp
bin src
romulus:cicd-test cbarlock$ ls tmp/bin
gosec
But when I run the same target as a build harness extension:
romulus:cicd-test cbarlock$ make test
export GOPATH=/Users/cbarlock/vscode/cicd-test/tmp && \
/usr/local/go/bin/go get -u <http://github.com/securego/gosec/cmd/gosec|github.com/securego/gosec/cmd/gosec>
romulus:cicd-test cbarlock$ ls tmp
src
Only the source files are downloaded and the binary is not created. Any ideas why this is happening?