Skip to content

Commit b158245

Browse files
authored
Merge pull request #302 from BolexLiu/master
添加shell返回换行
2 parents 9ab18b2 + ba039ba commit b158245

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
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(s);
117+
successMsg.append(System.getProperty("line.separator"));
118+
successMsg.append(System.getProperty("line.separator"));
118119
}
119120
while ((s = errorResult.readLine()) != null) {
121+
errorMsg.append("\n");
120122
errorMsg.append(s);
121123
}
122124
}

0 commit comments

Comments
 (0)