This commit is contained in:
cdle
2021-09-30 20:43:47 +08:00
parent cfe69f29e9
commit 3c652a8551
+3 -1
View File
@@ -60,7 +60,9 @@ func GitPull(filename string) (bool, error) {
}
func CompileCode() error {
_, err := exec.Command("sh", "-c", "cd "+ExecPath+" && go build -o "+pname).Output()
cmd := exec.Command("go", "build")
cmd.Path = ExecPath
_, err := cmd.Output()
if err != nil {
return errors.New("编译失败:" + err.Error() + "。")
}