1
0
镜像自地址 https://github.com/beego/bee.git 已同步 2025-07-17 18:22:17 +00:00

auto delete temp file while error

这个提交包含在:
ZhengYang
2014-08-13 17:15:32 +08:00
父节点 83dd1e256a
当前提交 7c5ebae748

查看文件

@@ -263,6 +263,8 @@ func buildMigrationBinary(dir, binary string) {
if out, err := cmd.CombinedOutput(); err != nil {
ColorLog("[ERRO] Could not build migration binary: %s\n", err)
formatShellErrOutput(string(out))
removeTempFile(dir, binary)
removeTempFile(dir, binary+".go")
os.Exit(2)
}
}
@@ -274,6 +276,8 @@ func runMigrationBinary(dir, binary string) {
if out, err := cmd.CombinedOutput(); err != nil {
formatShellOutput(string(out))
ColorLog("[ERRO] Could not run migration binary: %s\n", err)
removeTempFile(dir, binary)
removeTempFile(dir, binary+".go")
os.Exit(2)
} else {
formatShellOutput(string(out))