From 28d6c8b50a0ecf3ee7d2e8a80d4e3b356491bc1a Mon Sep 17 00:00:00 2001 From: Suger <66729182+suger-bl@users.noreply.github.com> Date: Fri, 13 Dec 2024 00:15:37 +0800 Subject: [PATCH] =?UTF-8?q?[Fix][Admin]=20Fix=20the=20situation=20where=20?= =?UTF-8?q?the=20"args"=20parameter=20is=20not=20pass=E2=80=A6=20(#4040)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Suger --- dinky-admin/src/main/java/org/dinky/utils/MavenUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dinky-admin/src/main/java/org/dinky/utils/MavenUtil.java b/dinky-admin/src/main/java/org/dinky/utils/MavenUtil.java index 52c02aff6f..0ecce60ef8 100644 --- a/dinky-admin/src/main/java/org/dinky/utils/MavenUtil.java +++ b/dinky-admin/src/main/java/org/dinky/utils/MavenUtil.java @@ -168,7 +168,9 @@ public static String getMavenCommandLineByMvn( commandLine.add("-Dclassworlds.conf=" + StrUtil.wrap(mavenHome + "/bin/m2.conf", "\"")); commandLine.add("-s " + settingsPath); commandLine.add("-f " + projectDir); - commandLine.add(StrUtil.wrap(StrUtil.replace(args, "\"", "\\*"), "\"")); + if (StrUtil.isNotBlank(args)) { + commandLine.add(StrUtil.wrap(StrUtil.replace(args, "\"", "\\*"), "\"")); + } commandLine.add(StrUtil.join(" ", goals)); return StrUtil.join(" ", commandLine); }