Commit 05f23f9
committed
doctor: Split version str with
On Windows at least `adb` prints it version string with carriage return;
leaving the `\r` in there (by only splitting on `\n`) and not trimming
the string causes us to print its version with a `\r` at the end,
clearing the whole line (i.e. it would print `adb 1.0.41\r` followed
by the path, and then only the path remains on this line).
Rust's `.lines()` implementation already takes care of this by splitting
(inclusively) on `\n` and trimming off that `\n` and _optionally also a
`\r`_ in the iterator before returning it to us..lines() to account for Windows' \r\n
1 parent 203d111 commit 05f23f9
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
0 commit comments