diff --git a/yudao-server/src/test/java/cn/iocoder/yudao/ProjectReactor.java b/yudao-server/src/test/java/cn/iocoder/yudao/ProjectReactor.java index 2cb2f9640..fb89612a3 100644 --- a/yudao-server/src/test/java/cn/iocoder/yudao/ProjectReactor.java +++ b/yudao-server/src/test/java/cn/iocoder/yudao/ProjectReactor.java @@ -48,8 +48,12 @@ public class ProjectReactor { String packageNameNew = "cn.start.pp"; String titleNew = "土豆管理系统"; String projectBaseDirNew = projectBaseDir + "-new"; // 一键改名后,“新”项目所在的目录 - log.info("[main][新项目路径地址 ({})]", projectBaseDirNew); - + log.info("[main][检测新项目目录 ({})是否存在]", projectBaseDirNew); + if (FileUtil.exist(projectBaseDirNew)) { + log.info("[main][新项目目录检测 ({})已存在,请更改新的目录,程序退出!]", projectBaseDirNew); + return; + } + log.info("[main][完成新项目目录检测,新项目路径地址 ({})]", projectBaseDirNew); // 获得需要复制的文件 log.info("[main][开始获得需要重写的文件,预计需要 10-20 秒]"); Collection files = listFiles(projectBaseDir);