mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Git - use close event when detecting git version (#184998)
This commit is contained in:
parent
819411f787
commit
3447686499
|
@ -73,7 +73,7 @@ function findSpecificGit(path: string, onValidate: (path: string) => boolean): P
|
|||
const child = cp.spawn(path, ['--version']);
|
||||
child.stdout.on('data', (b: Buffer) => buffers.push(b));
|
||||
child.on('error', cpErrorHandler(e));
|
||||
child.on('exit', code => code ? e(new Error('Not found')) : c({ path, version: parseVersion(Buffer.concat(buffers).toString('utf8').trim()) }));
|
||||
child.on('close', code => code ? e(new Error('Not found')) : c({ path, version: parseVersion(Buffer.concat(buffers).toString('utf8').trim()) }));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue