This commit is contained in:
Johannes Rieken
2017-05-12 12:42:34 +02:00
parent 217c742483
commit aa8f889b8a
+8 -4
View File
@@ -113,11 +113,15 @@ export class VSCodeApplication {
});
ipc.on('vscode:fetchShellEnv', (event, windowId) => {
const win = BrowserWindow.fromId(windowId);
const { webContents } = BrowserWindow.fromId(windowId);
getShellEnvironment().then(shellEnv => {
win.webContents.send('vscode:acceptShellEnv', shellEnv);
if (!webContents.isDestroyed()) {
webContents.send('vscode:acceptShellEnv', shellEnv);
}
}, err => {
win.webContents.send('vscode:acceptShellEnv', {});
if (!webContents.isDestroyed()) {
webContents.send('vscode:acceptShellEnv', {});
}
console.error('Error fetching shell env', err);
});
});
@@ -265,4 +269,4 @@ export class VSCodeApplication {
private dispose(): void {
this.toDispose = dispose(this.toDispose);
}
}
}