Skip to content

Commit 4a6b4d3

Browse files
Makefile: handle $GOPATH with a trailing slash
When a $GOPATH contains a trailing slash, the current check for string equality between the repo root and the computed path does not pass, even though it should. Passing both sides of the check through `abspath` makes this check more robust. Signed-off-by: Steve Kuznetsov <[email protected]>
1 parent 1fd6d67 commit 4a6b4d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ DOCKER_BUILDKIT=1
7676
export ACK_GINKGO_DEPRECATIONS := 1.16.4
7777

7878
# Set --output-base for conversion-gen if we are not within GOPATH
79-
ifneq ($(abspath $(REPO_ROOT)),$(shell go env GOPATH)/src/sigs.k8s.io/cluster-api-provider-aws)
79+
ifneq ($(abspath $(REPO_ROOT)),$(abspath $(shell go env GOPATH)/src/sigs.k8s.io/cluster-api-provider-aws))
8080
GEN_OUTPUT_BASE := --output-base=$(REPO_ROOT)
8181
else
8282
export GOPATH := $(shell go env GOPATH)

0 commit comments

Comments
 (0)