Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@
}

export const executeExtensionCommand = async (commandId: string, ...args: readonly any[]): Promise<unknown> => {
let shouldRetry = true
try {
return await ExtensionManagementWorker.invoke('Extensions.executeExtensionCommand', commandId, ...args)
} catch {
// legacy
// TODO maybe ask extension-management-worker instead
return RendererWorker.invoke('ExtensionHost.executeCommand', commandId, ...args)
const result = await ExtensionManagementWorker.invoke('Extensions.executeExtensionCommand', commandId, ...args)
shouldRetry = false
if (result && !result.wasFound) {
throw new Error(`command ${commandId} was not found`)
}
return result.result
} catch (error) {
if (shouldRetry) {
// legacy
// TODO maybe ask extension-management-worker instead
return await RendererWorker.invoke('ExtensionHost.executeCommand', commandId, ...args)
} else {

Check failure on line 21 in packages/test-worker/src/parts/TestFrameWorkComponentCommand/TestFrameWorkComponentCommand.ts

View workflow job for this annotation

GitHub Actions / pr (windows-2025)

Unexpected `else` after a statement that exits

Check failure on line 21 in packages/test-worker/src/parts/TestFrameWorkComponentCommand/TestFrameWorkComponentCommand.ts

View workflow job for this annotation

GitHub Actions / pr (ubuntu-24.04)

Unexpected `else` after a statement that exits

Check failure on line 21 in packages/test-worker/src/parts/TestFrameWorkComponentCommand/TestFrameWorkComponentCommand.ts

View workflow job for this annotation

GitHub Actions / pr (macos-15)

Unexpected `else` after a statement that exits
throw error
}
}
}
Loading