Skip to content

Commit 9a94030

Browse files
committed
Fix OS detection (process.getguid() does not exist on Windows)
1 parent 95d415b commit 9a94030

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/vs/base/common/platform.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ interface INodeProcess {
2727
platform: string;
2828
env: IProcessEnvironment;
2929
getuid(): number;
30+
nextTick: Function;
3031
}
3132
declare let process: INodeProcess;
3233
declare let global: any;
@@ -41,7 +42,7 @@ declare let self: any;
4142
export const LANGUAGE_DEFAULT = 'en';
4243

4344
// OS detection
44-
if (typeof process === 'object' && typeof process.getuid === 'function') {
45+
if (typeof process === 'object' && typeof process.nextTick === 'function') {
4546
_isWindows = (process.platform === 'win32');
4647
_isMacintosh = (process.platform === 'darwin');
4748
_isLinux = (process.platform === 'linux');

0 commit comments

Comments
 (0)