mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Fix #53838 - workaround strange error from telemetry
This commit is contained in:
parent
8422fccff1
commit
b6902fd662
|
@ -114,16 +114,22 @@ export class RipgrepFileSearchEngine implements IInternalFileSearchProvider {
|
|||
cb(err, stdout, last);
|
||||
};
|
||||
|
||||
let gotData = false;
|
||||
if (cmd.stdout) {
|
||||
// Should be non-null, but #38195
|
||||
this.forwardData(cmd.stdout, onData);
|
||||
cmd.stdout.once('data', () => gotData = true);
|
||||
} else {
|
||||
this.outputChannel.appendLine('stdout is null');
|
||||
}
|
||||
|
||||
const stderr = this.collectData(cmd.stderr);
|
||||
|
||||
let gotData = false;
|
||||
cmd.stdout.once('data', () => gotData = true);
|
||||
let stderr: Buffer[];
|
||||
if (cmd.stderr) {
|
||||
// Should be non-null, but #38195
|
||||
stderr = this.collectData(cmd.stderr);
|
||||
} else {
|
||||
this.outputChannel.appendLine('stderr is null');
|
||||
}
|
||||
|
||||
cmd.on('error', (err: Error) => {
|
||||
onData(err);
|
||||
|
|
|
@ -384,17 +384,22 @@ export class FileWalker {
|
|||
cb(err, stdout, last);
|
||||
};
|
||||
|
||||
let gotData = false;
|
||||
if (cmd.stdout) {
|
||||
// Should be non-null, but #38195
|
||||
this.forwardData(cmd.stdout, encoding, onData);
|
||||
cmd.stdout.once('data', () => gotData = true);
|
||||
} else {
|
||||
onMessage({ message: 'stdout is null' });
|
||||
}
|
||||
|
||||
const stderr = this.collectData(cmd.stderr);
|
||||
|
||||
let gotData = false;
|
||||
cmd.stdout.once('data', () => gotData = true);
|
||||
let stderr: Buffer[];
|
||||
if (cmd.stderr) {
|
||||
// Should be non-null, but #38195
|
||||
stderr = this.collectData(cmd.stderr);
|
||||
} else {
|
||||
onMessage({ message: 'stderr is null' });
|
||||
}
|
||||
|
||||
cmd.on('error', (err: Error) => {
|
||||
onData(err);
|
||||
|
|
Loading…
Reference in a new issue