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