From e1d4cea0835b83ed3f3d53dc32aa18cfe6b06e2a Mon Sep 17 00:00:00 2001 From: gitadmin Date: Mon, 26 Oct 2026 09:36:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/golang/stages/BuildService.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/golang/stages/BuildService.groovy b/src/com/golang/stages/BuildService.groovy index 0c17038..22f96b7 100644 --- a/src/com/golang/stages/BuildService.groovy +++ b/src/com/golang/stages/BuildService.groovy @@ -265,9 +265,9 @@ class BuildService implements Serializable { def mainPath = goFilePath ? "${goFilePath}/${mainFile}" : mainFile // 执行编译命令 if (buildFlags) { - script.sh "go build ${buildFlags} -o ${goFile} ${mainFile}" + script.sh "go build ${buildFlags} -o ${goFile} ${mainPath}" } else { - script.sh "go build -o ${goFile} ${mainFile}" + script.sh "go build -o ${goFile} ${mainPath}" } // 移动文件到指定目录(如果输出路径不是当前目录)