From a9e25889ddac7a23156c6ce5b6c59cf70fa984d1 Mon Sep 17 00:00:00 2001 From: CityFun <31820853+zhengkunwang223@users.noreply.github.com> Date: Tue, 13 May 2025 17:52:41 +0800 Subject: [PATCH] fix: fix issue with blank php app (#8618) --- Makefile | 20 -------------------- agent/app/service/app.go | 5 ++++- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 01de0245f..6cb98ff82 100644 --- a/Makefile +++ b/Makefile @@ -44,26 +44,6 @@ build_agent_on_darwin: cd $(AGENT_PATH) \ && GOOS=linux GOARCH=amd64 $(GOBUILD) -trimpath -ldflags '-s -w' -o $(BUILD_PATH)/$(AGENT_NAME) $(AGENT_MAIN) -build_agent_xpack_on_darwin: - cd $(AGENT_PATH) \ - && GOOS=linux GOARCH=amd64 $(GOBUILD) -tags=xpack -trimpath -ldflags '-s -w' -o $(BUILD_PATH)/$(AGENT_NAME) $(AGENT_MAIN) - -build_agent_xpack_on_linux: - cd $(AGENT_PATH) \ - && GOOS=$(GOOS) GOARCH=$(GOARCH) $(GOBUILD) -tags=xpack -trimpath -ldflags '-s -w' -o $(BUILD_PATH)/$(AGENT_NAME) $(AGENT_MAIN) - -build_core_xpack_on_darwin: - cd $(CORE_PATH) \ - && GOOS=linux GOARCH=amd64 $(GOBUILD) -tags=xpack -trimpath -ldflags '-s -w' -o $(BUILD_PATH)/$(CORE_NAME) $(CORE_MAIN) - -build_core_xpack_on_linux: - cd $(CORE_PATH) \ - && GOOS=$(GOOS) GOARCH=$(GOARCH) $(GOBUILD) -tags=xpack -trimpath -ldflags '-s -w' -o $(BUILD_PATH)/$(CORE_NAME) $(CORE_MAIN) - build_all: build_frontend build_core_on_linux build_agent_on_linux -build_xpack_all: build_frontend build_core_xpack_on_linux build_agent_xpack_on_linux - build_on_local: clean_assets build_frontend build_core_on_darwin build_agent_on_darwin upx_bin - -build_xpack_on_local: clean_assets build_frontend build_core_xpack_on_darwin build_agent_xpack_on_darwin upx_bin diff --git a/agent/app/service/app.go b/agent/app/service/app.go index 698b2a3f5..a7111585f 100644 --- a/agent/app/service/app.go +++ b/agent/app/service/app.go @@ -954,7 +954,10 @@ func (a AppService) SyncAppListFromRemote(taskID string) (err error) { t.LogStart(i18n.GetMsgByKey("SyncAppDetail")) for _, l := range list.Apps { - app := appsMap[l.AppProperty.Key] + app, ok := appsMap[l.AppProperty.Key] + if !ok { + continue + } iconStr := "" _, iconRes, err := req_helper.HandleRequest(l.Icon, http.MethodGet, constant.TimeOut20s) if err == nil {