chore: generate
This commit is contained in:
@@ -104,12 +104,7 @@ export function registerIpcHandlers(deps: Deps) {
|
||||
)
|
||||
ipcMain.handle("set-native-translations", (event: IpcMainInvokeEvent, value: unknown) => {
|
||||
const win = BrowserWindow.fromWebContents(event.sender)
|
||||
if (
|
||||
!win ||
|
||||
win.isDestroyed() ||
|
||||
win.webContents !== event.sender ||
|
||||
event.senderFrame !== event.sender.mainFrame
|
||||
) {
|
||||
if (!win || win.isDestroyed() || win.webContents !== event.sender || event.senderFrame !== event.sender.mainFrame) {
|
||||
throw new Error("Invalid native translation sender")
|
||||
}
|
||||
const bundle = parseDesktopNativeBundle(value)
|
||||
|
||||
@@ -70,9 +70,7 @@ function runCommand(command: string, args: string[], opts: RunWslOptions = {}) {
|
||||
/* ignore */
|
||||
}
|
||||
reject(
|
||||
new Error(
|
||||
nativeT("desktop.wsl.error.commandTimeout", { command, args: args.join(" "), timeout: timeoutMs }),
|
||||
),
|
||||
new Error(nativeT("desktop.wsl.error.commandTimeout", { command, args: args.join(" "), timeout: timeoutMs })),
|
||||
)
|
||||
}, timeoutMs)
|
||||
|
||||
@@ -145,9 +143,7 @@ function runInteractiveCommand(command: string, args: string[], opts: RunWslOpti
|
||||
settled = true
|
||||
cleanup()
|
||||
reject(
|
||||
new Error(
|
||||
nativeT("desktop.wsl.error.commandTimeout", { command, args: args.join(" "), timeout: timeoutMs }),
|
||||
),
|
||||
new Error(nativeT("desktop.wsl.error.commandTimeout", { command, args: args.join(" "), timeout: timeoutMs })),
|
||||
)
|
||||
}, timeoutMs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user