mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-11-30 10:58:14 +08:00
格式化命令中的换行
This commit is contained in:
parent
786df0d8e1
commit
458e967336
@ -11,6 +11,7 @@
|
|||||||
3. 【Server】节点分发列表点击控制台、文件管理404
|
3. 【Server】节点分发列表点击控制台、文件管理404
|
||||||
4. 【Server】节点分发顺序重启休眠时间取构建名称最后的时间(测试构建:10 则睡眠时间为10秒)
|
4. 【Server】节点分发顺序重启休眠时间取构建名称最后的时间(测试构建:10 则睡眠时间为10秒)
|
||||||
5. 【Agent】启动完成打印授权信息日志级别调至error
|
5. 【Agent】启动完成打印授权信息日志级别调至error
|
||||||
|
6. CommandUtil.asyncExeLocalCommand 方法格式化命令中的换行
|
||||||
|
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
@ -113,9 +113,12 @@ public class CommandUtil {
|
|||||||
* @throws IOException 异常
|
* @throws IOException 异常
|
||||||
*/
|
*/
|
||||||
public static void asyncExeLocalCommand(File file, String command) throws Exception {
|
public static void asyncExeLocalCommand(File file, String command) throws Exception {
|
||||||
DefaultSystemLog.getLog().info(command);
|
String newCommand = StrUtil.replace(command, StrUtil.CRLF, StrUtil.SPACE);
|
||||||
|
newCommand = StrUtil.replace(newCommand, StrUtil.LF, StrUtil.SPACE);
|
||||||
|
//
|
||||||
|
DefaultSystemLog.getLog().info(newCommand);
|
||||||
List<String> commands = getCommand();
|
List<String> commands = getCommand();
|
||||||
commands.add(command);
|
commands.add(newCommand);
|
||||||
ProcessBuilder pb = new ProcessBuilder(commands);
|
ProcessBuilder pb = new ProcessBuilder(commands);
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
pb.directory(file);
|
pb.directory(file);
|
||||||
|
Loading…
Reference in New Issue
Block a user