Skip to content

Commit ba039ba

Browse files
committed
修改换行为跨平台支持
1 parent 94bb52a commit ba039ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ 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");
118-
successMsg.append(s);
117+
successMsg.append(System.getProperty("line.separator"));
118+
successMsg.append(System.getProperty("line.separator"));
119119
}
120120
while ((s = errorResult.readLine()) != null) {
121121
errorMsg.append("\n");

0 commit comments

Comments
 (0)