mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 23:31:52 +08:00
commit
83dc4047a9
@ -50,7 +50,12 @@ public class ProjectReactor {
|
||||
String projectBaseDirNew = projectBaseDir + "-new"; // 一键改名后,“新”项目所在的目录
|
||||
log.info("[main][检测新项目目录 ({})是否存在]", projectBaseDirNew);
|
||||
if (FileUtil.exist(projectBaseDirNew)) {
|
||||
log.info("[main][新项目目录检测 ({})已存在,请更改新的目录,程序退出]", projectBaseDirNew);
|
||||
log.error("[main][新项目目录检测 ({})已存在,请更改新的目录!程序退出]", projectBaseDirNew);
|
||||
return;
|
||||
}
|
||||
// 如果新目录中存在 PACKAGE_NAME,ARTIFACT_ID 等关键字,路径会被替换,导致生成的文件不在预期目录
|
||||
if (StrUtil.containsAny(projectBaseDirNew, PACKAGE_NAME, ARTIFACT_ID, StrUtil.upperFirst(ARTIFACT_ID))) {
|
||||
log.error("[main][新项目目录检测 ({}) 存在冲突名称「{}」或者「{}」,请更改新的目录!程序退出]", projectBaseDirNew, PACKAGE_NAME, ARTIFACT_ID);
|
||||
return;
|
||||
}
|
||||
log.info("[main][完成新项目目录检测,新项目路径地址 ({})]", projectBaseDirNew);
|
||||
|
Loading…
Reference in New Issue
Block a user