mirror of
https://github.com/google-gemini/gemini-cli
synced 2026-04-21 13:37:17 +00:00
fix(shell): trim pgrep output lines to handle potential CRLF carriage returns
This commit is contained in:
parent
61e046f7cc
commit
c0d3fdc4c7
1 changed files with 4 additions and 1 deletions
|
|
@ -641,7 +641,10 @@ export class ShellToolInvocation extends BaseToolInvocation<
|
|||
|
||||
if (tempFileExists) {
|
||||
const pgrepContent = await fsPromises.readFile(tempFilePath, 'utf8');
|
||||
const pgrepLines = pgrepContent.split('\n').filter(Boolean);
|
||||
const pgrepLines = pgrepContent
|
||||
.split('\n')
|
||||
.map((line) => line.trim())
|
||||
.filter(Boolean);
|
||||
for (const line of pgrepLines) {
|
||||
if (!/^\d+$/.test(line)) {
|
||||
if (
|
||||
|
|
|
|||
Loading…
Reference in a new issue