From c8fcb6d3ed35266a25af45819c6377aa0ce6698e Mon Sep 17 00:00:00 2001 From: cksspk Date: Mon, 1 Aug 2022 09:36:57 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/test/java/cn/iocoder/yudao/ProjectReactor.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 2d0861f1b..5a8da1b20 100644 --- a/yudao-server/src/test/java/cn/iocoder/yudao/ProjectReactor.java +++ b/yudao-server/src/test/java/cn/iocoder/yudao/ProjectReactor.java @@ -50,12 +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.info("[main][新项目目录检测 ({}) 存在冲突名称「{}」或者「{}」,请更改新的目录,程序退出]", projectBaseDirNew, PACKAGE_NAME, ARTIFACT_ID); + // 如果新目录中存在 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);