This commit is contained in:
Eugene Pankov
2021-12-08 20:38:16 +01:00
parent b2b91f0cfd
commit a34e4c236d
4 changed files with 7 additions and 6 deletions

View File

@@ -6,7 +6,7 @@ export class X11Socket {
private socket: Socket | null = null
static resolveDisplaySpec (spec?: string|null): SocketConnectOpts {
// eslint-disable-next-line prefer-const
// eslint-disable-next-line prefer-const, @typescript-eslint/no-unused-vars
let [_, xHost, xDisplay] = /^(.+):(\d+)(?:.(\d+))$/.exec(spec ?? process.env.DISPLAY ?? 'localhost:0') ?? []
if (process.platform === 'win32') {
xHost ??= 'localhost'