Why doesn’t my Makefile interpolate an expression in a command

In a Makefile recipe section you will need to escape the $ using a second $:

test:
    go test $$(go list ./... | grep -v /vendor/)

.PHONY: test

Leave a Comment