Skip to content

Commit 4b1c6cd

Browse files
authored
Make HAS_GO a simply expanded variable (#24169)
Avoid recursive expansion on this variable and simplify the value. [Reference](https://www.gnu.org/software/make/manual/html_node/Setting.html).
1 parent cda84be commit 4b1c6cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ IMPORT := code.gitea.io/gitea
2020

2121
GO ?= go
2222
SHASUM ?= shasum -a 256
23-
HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" )
23+
HAS_GO := $(shell hash $(GO) > /dev/null 2>&1 && echo yes)
2424
COMMA := ,
2525

2626
XGO_VERSION := go-1.20.x
@@ -41,7 +41,7 @@ DOCKER_IMAGE ?= gitea/gitea
4141
DOCKER_TAG ?= latest
4242
DOCKER_REF := $(DOCKER_IMAGE):$(DOCKER_TAG)
4343

44-
ifeq ($(HAS_GO), GO)
44+
ifeq ($(HAS_GO), yes)
4545
GOPATH ?= $(shell $(GO) env GOPATH)
4646
export PATH := $(GOPATH)/bin:$(PATH)
4747

0 commit comments

Comments
 (0)