mirror of
https://github.com/microsoft/pyright.git
synced 2024-09-11 07:55:56 +03:00
Fixed bug that results in a confusing error message when stub generation fails. This addresses #8044.
This commit is contained in:
parent
c7fbc82337
commit
ecc4ebb12a
@ -34,9 +34,9 @@ import { RealTempFile, createFromRealFileSystem } from './common/realFileSystem'
|
||||
import { ServiceProvider } from './common/serviceProvider';
|
||||
import { createServiceProvider } from './common/serviceProviderExtensions';
|
||||
import { Range, isEmptyRange } from './common/textRange';
|
||||
import { Uri } from './common/uri/uri';
|
||||
import { getFileSpec, tryStat } from './common/uri/uriUtils';
|
||||
import { PyrightFileSystem } from './pyrightFileSystem';
|
||||
import { Uri } from './common/uri/uri';
|
||||
|
||||
const toolName = 'pyright';
|
||||
|
||||
@ -446,10 +446,10 @@ async function processArgs(): Promise<ExitStatus> {
|
||||
} catch (err) {
|
||||
let errMessage = '';
|
||||
if (err instanceof Error) {
|
||||
errMessage = ': ' + err.message;
|
||||
errMessage = err.message;
|
||||
}
|
||||
|
||||
console.error(`Error occurred when creating type stub: ` + errMessage);
|
||||
console.error(`Error occurred when creating type stub: ${errMessage}`);
|
||||
exitStatus.resolve(ExitStatus.FatalError);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user