mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
Log more info about platform for further diagnosis
This commit is contained in:
parent
b0c6843f3e
commit
c661b407d1
@ -33,6 +33,7 @@ namespace ts.server {
|
||||
const os: {
|
||||
homedir?(): string;
|
||||
tmpdir(): string;
|
||||
platform(): string;
|
||||
} = require("os");
|
||||
|
||||
interface NodeSocket {
|
||||
@ -824,8 +825,9 @@ namespace ts.server {
|
||||
const logger = createLogger();
|
||||
|
||||
const sys = <ServerHost>ts.sys;
|
||||
const nodeVersion = getNodeMajorVersion();
|
||||
// use watchGuard process on Windows when node version is 4 or later
|
||||
const useWatchGuard = process.platform === "win32" && getNodeMajorVersion() >= 4;
|
||||
const useWatchGuard = process.platform === "win32" && nodeVersion >= 4;
|
||||
const originalWatchDirectory: ServerHost["watchDirectory"] = sys.watchDirectory.bind(sys);
|
||||
const noopWatcher: FileWatcher = { close: noop };
|
||||
// This is the function that catches the exceptions when watching directory, and yet lets project service continue to function
|
||||
@ -980,8 +982,9 @@ namespace ts.server {
|
||||
};
|
||||
|
||||
logger.info(`Starting TS Server`);
|
||||
logger.info(`Version: ${versionMajorMinor}`);
|
||||
logger.info(`Version: ${version}`);
|
||||
logger.info(`Arguments: ${process.argv.join(" ")}`);
|
||||
logger.info(`Platform: ${os.platform()} NodeVersion: ${nodeVersion} CaseSensitive: ${sys.useCaseSensitiveFileNames}`);
|
||||
|
||||
const ioSession = new IOSession(options);
|
||||
process.on("uncaughtException", err => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user