Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit 92ae35b

Browse files
committed
Optimise suspicious stdout check a little
1 parent 88c1dd5 commit 92ae35b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,9 @@ function logSuspiciousStdout(process) {
210210
chunk.toString('utf8')
211211
.split('\n')
212212
.filter(l => l.trim() &&
213+
l.length < 10000 && // ignore long chunks, these are much more likely to be false positives
213214
!l.startsWith("Content-Length:") &&
214-
!l.includes('"jsonrpc":"2.0"') &&
215-
// long chunks are much more likely to be false positives so ignore
216-
l.length < 10000)
215+
!l.includes('"jsonrpc":"2.0"'))
217216
.forEach(line => console.error("Rust (RLS) suspicious stdout:", line))
218217
})
219218
return process

0 commit comments

Comments
 (0)