From 7c730b97d87da196e9db69d68765ed71ea6e6faa Mon Sep 17 00:00:00 2001 From: guangwu Date: Fri, 10 May 2024 21:33:03 +0800 Subject: [PATCH] fix: make: command: Command not found (#4132) Signed-off-by: guoguangwu --- tools/goctl/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/goctl/Makefile b/tools/goctl/Makefile index 14a725e5..f7b92d3d 100644 --- a/tools/goctl/Makefile +++ b/tools/goctl/Makefile @@ -1,18 +1,18 @@ build: go build -ldflags="-s -w" goctl.go - $(if $(shell command -v upx), upx goctl) + $(if $(shell command -v upx || which upx), upx goctl) mac: GOOS=darwin go build -ldflags="-s -w" -o goctl-darwin goctl.go - $(if $(shell command -v upx), upx goctl-darwin) + $(if $(shell command -v upx || which upx), upx goctl-darwin) win: GOOS=windows go build -ldflags="-s -w" -o goctl.exe goctl.go - $(if $(shell command -v upx), upx goctl.exe) + $(if $(shell command -v upx || which upx), upx goctl.exe) linux: GOOS=linux go build -ldflags="-s -w" -o goctl-linux goctl.go - $(if $(shell command -v upx), upx goctl-linux) + $(if $(shell command -v upx || which upx), upx goctl-linux) image: docker build --rm --platform linux/amd64 -t kevinwan/goctl:$(version) .