From c389c7625dcda62bced5d85c3b712a3d9d2daecf Mon Sep 17 00:00:00 2001 From: rcourtman Date: Tue, 14 Oct 2025 09:56:40 +0000 Subject: [PATCH] fix: fallback agent download for legacy docker layout --- internal/api/router.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/api/router.go b/internal/api/router.go index 0a188cb..96ea585 100644 --- a/internal/api/router.go +++ b/internal/api/router.go @@ -2716,12 +2716,13 @@ func (r *Router) handleDownloadAgent(w http.ResponseWriter, req *http.Request) { w.Header().Set("Expires", "0") archParam := strings.TrimSpace(req.URL.Query().Get("arch")) - searchPaths := make([]string, 0, 4) + searchPaths := make([]string, 0, 6) if normalized := normalizeDockerAgentArch(archParam); normalized != "" { searchPaths = append(searchPaths, filepath.Join("/opt/pulse/bin", "pulse-docker-agent-"+normalized), filepath.Join("/opt/pulse", "pulse-docker-agent-"+normalized), + filepath.Join("/app", "pulse-docker-agent-"+normalized), // legacy Docker image layout ) } @@ -2729,6 +2730,7 @@ func (r *Router) handleDownloadAgent(w http.ResponseWriter, req *http.Request) { searchPaths = append(searchPaths, filepath.Join("/opt/pulse/bin", "pulse-docker-agent"), "/opt/pulse/pulse-docker-agent", + filepath.Join("/app", "pulse-docker-agent"), // legacy Docker image layout ) for _, candidate := range searchPaths {