mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-23 16:49:50 +01:00
fix #26512
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user