Skip to content

Commit c661b40

Browse files
committed
Log more info about platform for further diagnosis
1 parent b0c6843 commit c661b40

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/server/server.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ namespace ts.server {
3333
const os: {
3434
homedir?(): string;
3535
tmpdir(): string;
36+
platform(): string;
3637
} = require("os");
3738

3839
interface NodeSocket {
@@ -824,8 +825,9 @@ namespace ts.server {
824825
const logger = createLogger();
825826

826827
const sys = <ServerHost>ts.sys;
828+
const nodeVersion = getNodeMajorVersion();
827829
// use watchGuard process on Windows when node version is 4 or later
828-
const useWatchGuard = process.platform === "win32" && getNodeMajorVersion() >= 4;
830+
const useWatchGuard = process.platform === "win32" && nodeVersion >= 4;
829831
const originalWatchDirectory: ServerHost["watchDirectory"] = sys.watchDirectory.bind(sys);
830832
const noopWatcher: FileWatcher = { close: noop };
831833
// 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 {
980982
};
981983

982984
logger.info(`Starting TS Server`);
983-
logger.info(`Version: ${versionMajorMinor}`);
985+
logger.info(`Version: ${version}`);
984986
logger.info(`Arguments: ${process.argv.join(" ")}`);
987+
logger.info(`Platform: ${os.platform()} NodeVersion: ${nodeVersion} CaseSensitive: ${sys.useCaseSensitiveFileNames}`);
985988

986989
const ioSession = new IOSession(options);
987990
process.on("uncaughtException", err => {

0 commit comments

Comments
 (0)