Skip to content

Commit d257875

Browse files
authored
Don't install keyboard layout change listener in CI (microsoft#152853)
Fixes microsoft#152840: Don't install keyboard layout change listener in CI
1 parent 08a4698 commit d257875

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/vs/platform/keyboardLayout/electron-main/keyboardLayoutMainService.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import * as nativeKeymap from 'native-keymap';
7+
import * as platform from 'vs/base/common/platform';
78
import { Emitter } from 'vs/base/common/event';
89
import { Disposable } from 'vs/base/common/lifecycle';
910
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
@@ -48,10 +49,15 @@ export class KeyboardLayoutMainService extends Disposable implements INativeKeyb
4849
const nativeKeymapMod = await import('native-keymap');
4950

5051
this._keyboardLayoutData = readKeyboardLayoutData(nativeKeymapMod);
51-
nativeKeymapMod.onDidChangeKeyboardLayout(() => {
52-
this._keyboardLayoutData = readKeyboardLayoutData(nativeKeymapMod);
53-
this._onDidChangeKeyboardLayout.fire(this._keyboardLayoutData);
54-
});
52+
if (!platform.isCI) {
53+
// See https://github.com/microsoft/vscode/issues/152840
54+
// Do not register the keyboard layout change listener in CI because it doesn't work
55+
// on the build machines and it just adds noise to the build logs.
56+
nativeKeymapMod.onDidChangeKeyboardLayout(() => {
57+
this._keyboardLayoutData = readKeyboardLayoutData(nativeKeymapMod);
58+
this._onDidChangeKeyboardLayout.fire(this._keyboardLayoutData);
59+
});
60+
}
5561
}
5662

5763
public async getKeyboardLayoutData(): Promise<IKeyboardLayoutData> {

0 commit comments

Comments
 (0)