debt - 💄 product config

This commit is contained in:
Benjamin Pasero
2019-09-11 08:13:47 +02:00
parent 94ee7ce1d7
commit e75e71f419
18 changed files with 290 additions and 206 deletions
+3 -2
View File
@@ -210,10 +210,11 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
}
private installWindowsMutex(): void {
if (isWindows) {
const win32MutexName = product.win32MutexName;
if (isWindows && win32MutexName) {
try {
const WindowsMutex = (require.__$__nodeRequire('windows-mutex') as typeof import('windows-mutex')).Mutex;
const mutex = new WindowsMutex(product.win32MutexName);
const mutex = new WindowsMutex(win32MutexName);
once(this.lifecycleService.onWillShutdown)(() => mutex.release());
} catch (e) {
this.logService.error(e);