From f750c3194eabcca24f21dc8018dcced91ff24bca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agn=C3=A8s=20Toulet?= <35176601+AgnesToulet@users.noreply.github.com> Date: Fri, 27 Oct 2023 15:28:41 +0200 Subject: [PATCH] Chore: Fix bingo variables for Windows (#73830) * Chore: Fix bingo variables for Windows * make the change for Windows-only --- .bingo/Variables.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.bingo/Variables.mk b/.bingo/Variables.mk index 84f3fe5ce8c..2c9eb124234 100644 --- a/.bingo/Variables.mk +++ b/.bingo/Variables.mk @@ -2,7 +2,12 @@ # All tools are designed to be build inside $GOBIN. BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST))) GOPATH ?= $(shell go env GOPATH) -GOBIN ?= $(firstword $(subst :, ,${GOPATH}))/bin +ifeq ($(OS),Windows_NT) + PATHSEP := $(if $(COMSPEC),;,:) + GOBIN ?= $(firstword $(subst $(PATHSEP), ,$(subst \,/,${GOPATH})))/bin +else + GOBIN ?= $(firstword $(subst :, ,${GOPATH}))/bin +endif GO ?= $(shell which go) # Below generated variables ensure that every time a tool under each variable is invoked, the correct version