Skip to content

Commit

Permalink
refactor(cli): use proper end of line regex to filter out adb trace l…
Browse files Browse the repository at this point in the history
…ines
  • Loading branch information
byCedric committed Mar 28, 2024
1 parent 7869af2 commit 54e27e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/@expo/cli/src/start/platforms/android/adb.ts
Expand Up @@ -231,7 +231,8 @@ export async function getAttachedDevicesAsync(): Promise<Device[]> {

const splitItems = output
.trim()
.replace(/\n$/, '')
// See: https://github.com/facebook/metro/blob/b18bc62f4328377662a6134033b9e6e579d02785/packages/metro/src/lib/countLines.js#L14
.replace(/(?:\r\n?|\n|\u2028|\u2029)?$/, '')
.split(os.EOL)
// Filter ADB trace logs from the output, e.g.
// adb D 03-06 15:25:53 63677 4018815 adb_client.cpp:393] adb_query: host:devices-l
Expand Down

0 comments on commit 54e27e3

Please sign in to comment.