mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-12 20:12:23 +01:00
Show remote cli connection error: For vscode-remote-release#6136
This commit is contained in:
@@ -356,13 +356,13 @@ function sendToPipe(args: PipeCommand, verbose: boolean): Promise<any> {
|
||||
res.on('data', chunk => {
|
||||
chunks.push(chunk);
|
||||
});
|
||||
res.on('error', () => fatal('Error in response'));
|
||||
res.on('error', (err) => fatal('Error in response.', err));
|
||||
res.on('end', () => {
|
||||
resolve(chunks.join(''));
|
||||
});
|
||||
});
|
||||
|
||||
req.on('error', () => fatal('Error in request'));
|
||||
req.on('error', (err) => fatal('Error in request.', err));
|
||||
req.write(message);
|
||||
req.end();
|
||||
});
|
||||
@@ -372,8 +372,8 @@ function asExtensionIdOrVSIX(inputs: string[] | undefined) {
|
||||
return inputs?.map(input => /\.vsix$/i.test(input) ? pathToURI(input).href : input);
|
||||
}
|
||||
|
||||
function fatal(err: any): void {
|
||||
console.error('Unable to connect to VS Code server.');
|
||||
function fatal(message: string, err: any): void {
|
||||
console.error('Unable to connect to VS Code server: ' + message);
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user