Skip to content

Commit 94bb52a

Browse files
committed
添加shell返回换行
1 parent 9ab18b2 commit 94bb52a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

utilcode/src/main/java/com/blankj/utilcode/util/ShellUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,11 @@ public static CommandResult execCmd(final String[] commands, final boolean isRoo
114114
errorResult = new BufferedReader(new InputStreamReader(process.getErrorStream(), "UTF-8"));
115115
String s;
116116
while ((s = successResult.readLine()) != null) {
117+
successMsg.append("\n");
117118
successMsg.append(s);
118119
}
119120
while ((s = errorResult.readLine()) != null) {
121+
errorMsg.append("\n");
120122
errorMsg.append(s);
121123
}
122124
}

0 commit comments

Comments
 (0)